O.currentUser

property O.currentUser

Returns a SecurityPrincipal representing the currently logged in user.

Example

This property is useful for performing authorisation in plugin requests. For example:

if(O.currentUser.isMemberOf(GROUP["std:group:administrators"])) {
    // do action
} else {
    // redirect away to unauthorised page
}

property O.currentAuthenticatedUser

Returns a SecurityPrincipal representing the user which originally authenticated in this session.

If the user is impersonating another user, O.currentUser will be the impersonated user, and O.currentAuthenticatedUser will be the user who impersonated that user.