The role-switch feature added in needs to post events for switching into and out of a 'view as' role.
As the code that should log this event is in portal rather than a tool placement, the context (siteid) should be explicitly set in the event using this newEvent method:
/**
Construct a Event object. *
@param event
The Event id.
@param resource
The resource reference.
@param context
The Event's context (may be null).
@param modify
Set to true if this event caused a resource modification, false if it was just an access.
@param priority
The Event's notification priority. Use NotificationService.NOTI_OPTIONAL as default.
@return A new Event object that can be used with this service. */ Event newEvent(String event, String resource, String context, boolean modify, int priority);
The REF would then only need to include the role that the user is becoming.
The role-switch feature added in needs to post events for switching into and out of a 'view as' role.
As the code that should log this event is in portal rather than a tool placement, the context (siteid) should be explicitly set in the event using this newEvent method:
/**
Construct a Event object.
*
@param event
The Event id.
@param resource
The resource reference.
@param context
The Event's context (may be null).
@param modify
Set to true if this event caused a resource modification, false if it was just an access.
@param priority
The Event's notification priority. Use NotificationService.NOTI_OPTIONAL as default.
@return A new Event object that can be used with this service.
*/
Event newEvent(String event, String resource, String context, boolean modify, int priority);
The REF would then only need to include the role that the user is becoming.