Package ch.ivyteam.ivy.security
Interface IUserToken
-
- All Known Subinterfaces:
ISession
,IWorkflowSession
public interface IUserToken
The user token interface provides some methods for testing if a user can act as (another) certain user or has a certain role. Note that a user token may act as more than one user and has more roles than a certain user because of sessions roles and user substitutions- Since:
- 17.05.2006
- API:
- This is a public API.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canActAsUser(IUser user)
Tests if the user of this user token currently can act as a certain workflow user.boolean
hasRole(IRole role, boolean useSessionRoles)
Test if the user of this user token currently owns a role.
-
-
-
Method Detail
-
canActAsUser
boolean canActAsUser(IUser user)
Tests if the user of this user token currently can act as a certain workflow user. Note that this method does not behave likeObject.equals(Object)
. A user token can act as more than just one workflow user because of substitutions.- Parameters:
user
- the workflow user to test- Returns:
- true if token user can act as the workflow user, otherwise false
- See Also:
canActAsUser(IUser, SubstituteInclusion)
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- Session: SESSION MATCHES THIS OR OWNS SessionCanActAsUser PERMISSION OR OWNS SessionCanActAsUser@SYSTEM PERMISSION
Session: SESSION MATCHES THIS OR OWNS SessionCanActAsUser PERMISSION OR OWNS SessionCanActAsUser@SYSTEM PERMISSION
-
hasRole
boolean hasRole(IRole role, boolean useSessionRoles)
Test if the user of this user token currently owns a role. Note that this method does not behave likeIUser.getRoles()
. A user token can have more roles than the user itself, because of a session role or substitutions.- Parameters:
role
- the role to testuseSessionRoles
- if true the temporary session roles are also checked- Returns:
- true if workflow user has the role,otherwise false
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- Session: SESSION MATCHES THIS OR OWNS SessionHasRole PERMISSION OR OWNS SessionHasRole@SYSTEM PERMISSION
Session: SESSION MATCHES THIS OR OWNS SessionHasRole PERMISSION OR OWNS SessionHasRole@SYSTEM PERMISSION
-
-