Package ch.ivyteam.ivy.security
Interface ISecurityMember
public interface ISecurityMember
Base interface for IUser and IRole.
- Since:
- 17.05.2006
- API:
- This is a public API.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
disable()
Disables the security member if enabled.void
enable()
Enables the security member if disabled.Returns the display name of this security member.long
getId()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the member name of the security member.getName()
Returns the name of this security member.Gets the security context this security member is defined inboolean
Whether the security member is enabled or not.boolean
isMember
(IUserToken userToken, boolean useSessionRoles) Returns true if the user token is a member of this task activatorboolean
isUser()
Is this member a user
-
Method Details
-
isMember
Returns true if the user token is a member of this task activator- Parameters:
userToken
- the user tokenuseSessionRoles
- if true the temporary roles set on a user session are also used for the check.- Returns:
- true if user token is a member, otherwise false
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in Java.
-
isEnabled
boolean isEnabled()Whether the security member is enabled or not.- Returns:
- true if enabled otherwise false
- Since:
- 9.1
- API:
- This public API is available in Java.
-
enable
void enable()Enables the security member if disabled.- Since:
- 9.1
- API:
- This public API is available in Java.
-
disable
void disable()Disables the security member if enabled.- Since:
- 9.1
- API:
- This public API is available in Java.
-
getMemberName
String getMemberName()Returns the member name of the security member. In case of a role the role name is returned. In case of a user "#" + user name is returned.- Returns:
- member name of this security member
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in Java.
- Security:
- SESSION (MATCHES THIS AND OWNS UserReadOwnName PERMISSION) OR OWNS UserReadName PERMISSION OR OWNS UserReadName@SYSTEM PERMISSION
-
getName
String getName()Returns the name of this security member.- Returns:
- name of this security member
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in Java.
- Security:
- Role: SESSION OWNS RoleReadName PERMISSION OR OWNS RoleReadName@SYSTEM PERMISSION
User: SESSION (MATCHES THIS AND OWNS UserReadOwnName PERMISSION) OR OWNS UserReadName PERMISSION OR OWNS UserReadName@SYSTEM PERMISSION
-
getDisplayName
String getDisplayName()Returns the display name of this security member. If the display name is empty, it returns the namegetName()
of this security member.- Returns:
- display name of this security member
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in Java.
- Security:
- Role: SESSION OWNS RoleReadDisplayName PERMISSION OR OWNS RoleReadDisplayName@SYSTEM PERMISSION
User: SESSION ((MATCHES THIS AND OWNS UserReadOwnName PERMISSION) OR OWNS UserReadName PERMISSION OR OWNS UserReadName@SYSTEM PERMISSION) AND ((MATCHES THIS AND OWNS UserReadOwnFullName PERMISSION) OR OWNS UserReadFullName PERMISSION OR OWNS UserReadFullName@SYSTEM PERMISSION)
-
isUser
boolean isUser()Is this member a user- Returns:
- true if the member is a user, false if it is role
- API:
- This public API is available in Java.
-
getId
Deprecated, for removal: This API element is subject to removal in a future version.usegetSecurityMemberId()
- API:
- This public API is available in Java.
-
getSecurityContext
ISecurityContext getSecurityContext()Gets the security context this security member is defined in- Returns:
- security context
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in Java.
-
getSecurityMemberId()