| Package: | CQ |
| Class: | User |
| Extends: | Object |
| Clientlib: | cq.widgets |
CQ.User.getCurrentUser()
to retrieve an instance of this class for the current user.| Property | Defined By | |
|---|---|---|
|
User.ADMIN : String
<static> The ID of the admin user (defaults to "admin").
|
User | |
|
User.ANONYMOUS : String
<static> The ID of the anonymous user (defaults to "anonymous").
|
User | |
|
User.LANGUAGE : String
<static> The path to the language property in the user info (defaults to "language").
|
User | |
|
User.LOGIN_SERVLET_URL : String Deprecated: since 5.5, use CQ.Sling.LOGIN_URL instead
<static> Login servlet URL |
User | |
|
User.LOGOUT_URL : String Deprecated: since 5.5, use CQ.Sling.LOGOUT_URL instead
<static> Logout URL |
User | |
|
User.PERMISSION_UPDATE : String
<static> The update permission (defaults to "update").
|
User | |
|
User.PLATFORM_LANGUAGE : String
<static> The path to the platform language property in the user info (defaults to
"platform/language").
|
User | |
|
User.PREFERENCES_PROVIDER_ID : String
<static> The default ID of the preferences provider.
|
User | |
|
User.PRIVILEGES_STORE_ID : String
<static> The default ID of the privileges store.
|
User | |
|
User.TOKEN_LOGIN_SERVLET_URL : String Deprecated: since 5.5, use CQ.Sling.LOGIN_URL instead
<static> Login servlet URL |
User | |
| Method | Defined By | |
|---|---|---|
|
User.getCurrentUser() : CQ.User <static> Returns an instance of the current user.
<static> Returns an instance of the current user.
Parameters:
|
User | |
|
User.getUserID() : String Deprecated: Use CQ.User.getCurrentUser().getUserID() instead.
<static> Returns the ID of the current user.
<static> Returns the ID of the current user.
Parameters:
|
User | |
User.getUserName( Boolean Protect ) : String Deprecated: Use CQ.User.getCurrentUser().getUserName() instead.
<static> Returns the name of the current user.
<static> Returns the name of the current user.
Parameters:
|
User | |
User.login( String user, String pass ) : void <static> Logs in with the specified user ID and password.
<static> Logs in with the specified user ID and password.
Parameters:
|
User | |
|
User.logout() : void <static> Logs the current user out.
<static> Logs the current user out.
Added in CQ 5.3.
Parameters:
|
User | |
|
getAllowedApps() : String[] Returns the applications the user has permission to use.
Returns the applications the user has permission to use.
Parameters:
|
User | |
|
getAuthType() : void Deprecated: Will be removed with no replacement. Returns
null always.
Parameters:
|
User | |
|
getHome() : String Returns the home of the user.
Returns the home of the user.
Parameters:
|
User | |
|
getLanguage() : String Returns the language selected by the user.
Returns the language selected by the user.
Parameters:
|
User | |
|
getLocale() : Object Returns the language selected by the user as a locale object.
Returns the language selected by the user as a locale object.
Added in CQ 5.4.
Parameters:
|
User | |
getPreference( String name ) : String Returns the specified user preference.
Returns the specified user preference.
Parameters:
|
User | |
|
getUserID() : String Returns the ID of the user.
Returns the ID of the user.
Parameters:
|
User | |
|
getUserName() : String Returns the name of the user.
Returns the name of the user.
Parameters:
|
User | |
hasPermission( String permission ) : Boolean Returns true if the user has the specified permission.
Returns true if the user has the specified permission.
Parameters:
|
User | |
hasPermissionOn( String permission, [String path] ) : Boolean Returns true if the user has the specified permission on a
certain path.
Returns true if the user has the specified permission on a
certain path.
Parameters:
|
User | |
|
isImpersonated() : Boolean Returns true if the user is the result of impersonation.
Returns true if the user is the result of impersonation.
Parameters:
|
User | |
login( String pwd ) : void Logs the user in with the specified password.
Logs the user in with the specified password.
Parameters:
|
User | |
|
revertSelf() : void Stops impersonating.
Stops impersonating.
Parameters:
|
User | |
sudoAs( String asUser ) : void Starts impersonating the user with the specified ID.
Starts impersonating the user with the specified ID.
Parameters:
|
User | |