public interface ISecurityService
Interface for the security service that provides access to the OpenPages security model. Use SecurityService to perform create or delete operations on IUser and IGroup Objects. Use SecuirtyService to retrieve RoleTemplates or ApplicationPermissions and assign role(s) to IUser. Use SecuirtyService to retrieve IPasswordPolicy.
GroupInfo
,
IGroup
,
UserInfo
,
IRoleTemplate
,
IFolder
,
IRoleAssignment
,
IApplicationPermission
,
IPasswordPolicy
Modifier and Type | Method and Description |
---|---|
void |
anonymizeUser(Id userId,
java.lang.String anonymizedText)
Anonymize the specified user attributes from OpenPages security system.
|
void |
assignRole(IGroup group,
IRoleTemplate roleTemplate,
IFolder folder)
Assigns role to specified group for the given folder.
|
void |
assignRole(IUser user,
IRoleTemplate roleTemplate,
IFolder folder)
Assigns role to specified user for the given folder.
|
void |
assignRoles(IGroup group,
java.util.List<IRoleTemplate> roleTemplates,
java.util.List<IFolder> folders)
Assigns each of the roles in the roleTemplates list to specified group in each of the folders.
|
void |
assignRoles(IUser user,
java.util.List<IRoleTemplate> roleTemplates,
java.util.List<IFolder> folders)
Assigns each of the roles in the roleTemplates list to a specified user in each of the folders.
|
IGroup |
createGroup(GroupInfo groupInfo)
Creates new security group based on provided group specification.
|
IGroup |
createGroup(GroupInfo groupInfo,
IGroup parentGroup)
Creates new security group based on provided group specification and
parent group.
|
IUser |
createUser(UserInfo userInfo,
java.util.List<IGroup> groups)
Creates user based on provided specification and a list of groups for
membership assignment.
|
void |
deleteGroups(java.util.List<IGroup> groups)
Deletes specified groups from OpenPages security system.
|
void |
deleteUsers(java.util.List<IUser> users)
Deletes specified users from OpenPages security system.
|
java.util.Iterator<IGroup> |
getAccessibleGroups()
Retrieves all groups accessible by current user.
|
java.util.List<Id> |
getActorImpersonates(Id actorId)
Find all actors, users or groups, that the given actor impersonates.
|
java.util.List<IAdminPermission> |
getAdminPermissions(java.util.List<Id> groupIds,
java.util.List<Id> administratorIds)
Finds administrator permissions for provided list of group ids and
list of administrator ids.
|
IApplicationPermission |
getApplicationPermission(Id id)
Retrieves application permission by Id.
|
IApplicationPermission |
getApplicationPermission(java.lang.String name)
Retrieves application permission by name.
|
java.util.List<IApplicationPermission> |
getApplicationPermissions()
Retrieves all the application permissions
|
IPasswordPolicy |
getCurrentPasswordPolicy()
Retrieves current OpenPages password policy.
|
IUser |
getCurrentUser()
Returns the currently logged in user.
|
IGroup |
getGroup(Id groupId)
Retrieves group by Id.
|
IGroup |
getGroup(Id groupId,
GroupOptions options)
Retrieves group by Id.
|
IGroup |
getGroup(java.lang.String groupName)
Retrieves group by name.
|
IGroup |
getGroup(java.lang.String groupName,
GroupOptions options)
Retrieves group by name.
|
java.util.Iterator<IGroup> |
getGroups(boolean includeActiveGroupsOnly)
Retrieves groups from the OpenPages security system.
|
IRoleAssignment |
getRoleAssignment(Id id)
Returns the role assignment corresponding to the specified Id.
|
java.util.Iterator<IRoleAssignment> |
getRoleAssignments()
Returns an iterator over all role assignments effective in the system.
|
java.util.Iterator<IRoleAssignment> |
getRoleAssignments(ISecurityPrincipal userOrGroup,
IRoleTemplate roleTemplate,
IFolder folder)
Returns an iterator over all role assignments effective in the user or group
|
IRoleTemplate |
getRoleTemplate(Id id)
Retrieves role template by Id.
|
IRoleTemplate |
getRoleTemplate(java.lang.String name)
Retrieves role template by name.
|
java.util.Iterator<IRoleTemplate> |
getRoleTemplates(boolean includesLockedTemplates,
boolean includesDisabledTemplates)
Retrieves role templates based on the specified criteria.
|
java.util.Iterator<IGroup> |
getTopLevelGroups()
Retrieves top level security groups from the OpenPages security model.
|
IUser |
getUser(Id userId)
Retrieves user by Id.
|
IUser |
getUser(java.lang.String userName)
Retrieves user information by name.
|
java.util.Iterator<IUser> |
getUsers(boolean includeActiveusersOnly)
Retrieves users from the OpenPages security system.
|
boolean |
hasPermission(IApplicationPermission applicationPermission)
Verifies if current user has application permission.
|
boolean |
isSecurityAdministrator()
Verifies if the current user is a security administrator.
|
boolean |
isSuperAdministrator(IUser user)
Checks whether the user is a system designated Super Administrator.
|
boolean |
isUser(Id id)
Check if the id represents an IUser instance
|
boolean isSecurityAdministrator()
IGroup createGroup(GroupInfo groupInfo)
groupInfo
- (required) GroupInfoIGroup createGroup(GroupInfo groupInfo, IGroup parentGroup)
groupInfo
- (required) GroupInfoparentGroup
- (required) parentGroupIUser createUser(UserInfo userInfo, java.util.List<IGroup> groups)
userInfo
- (required) UserInfogroups
- (required) list of groupsvoid deleteUsers(java.util.List<IUser> users)
users
- (required) list of usersvoid anonymizeUser(Id userId, java.lang.String anonymizedText)
The anonymized text is "Anonymous", if it is not specified. The first name, last name and description of the user will be the anonymized text. The middle name of the user will be empty. The email address of the user will be "{anonymizedText}@{anonymizedText:lowercase}.com", e.g. "Anonymous@anonymous.com".Note: please make sure that the given user's activity in the system has terminated/quiesced before anonymizing them.
Permissions:
The operation can only be performed by a super user.
userId
- (required) the user idanonymizedText
- (optional) the anonymized text, default "Anonymous", the maximum length of the value is 64.void deleteGroups(java.util.List<IGroup> groups)
groups
- (required) list of groupsjava.util.Iterator<IGroup> getGroups(boolean includeActiveGroupsOnly)
includeActiveGroupsOnly
- java.util.Iterator<IUser> getUsers(boolean includeActiveusersOnly)
includeActiveusersOnly
- IGroup getGroup(Id groupId)
groupId
- (required) Id of the groupIGroup getGroup(Id groupId, GroupOptions options)
groupId
- (required) Id of the groupoptions
- (required) specifies the data to be retrieved. The default behavior retrieves all group members.IGroup getGroup(java.lang.String groupName)
groupName
- (required) name of the groupIGroup getGroup(java.lang.String groupName, GroupOptions options)
groupName
- (required) name of the groupoptions
- (required) specifies the data to be retrieved. The default behavior retrieves all group members.IUser getUser(Id userId)
userId
- (required)IUser getUser(java.lang.String userName)
userName
- (required)java.util.Iterator<IGroup> getTopLevelGroups()
void assignRoles(IUser user, java.util.List<IRoleTemplate> roleTemplates, java.util.List<IFolder> folders)
user
- (required) IUser objectroleTemplates
- (required) list of IRoleTemplatefolders
- (required) list of IFoldervoid assignRole(IUser user, IRoleTemplate roleTemplate, IFolder folder)
user
- (required) IUser objectroleTemplate
- (required) IRoleTemplatefolder
- (required) IFoldervoid assignRoles(IGroup group, java.util.List<IRoleTemplate> roleTemplates, java.util.List<IFolder> folders)
user
- (required) IGroup objectroleTemplates
- (required) list of IRoleTemplatefolders
- (required) list of IFoldervoid assignRole(IGroup group, IRoleTemplate roleTemplate, IFolder folder)
user
- (required) An IGroup objectroleTemplate
- (required) IRoleTemplatefolder
- (required) IFolderjava.util.Iterator<IRoleTemplate> getRoleTemplates(boolean includesLockedTemplates, boolean includesDisabledTemplates)
includesLcokedTemplates
- includesDisabledTemplates
- IRoleTemplate getRoleTemplate(Id id)
id
- (required) RoleTemplate IdIRoleTemplate getRoleTemplate(java.lang.String name)
name
- (required)IPasswordPolicy getCurrentPasswordPolicy()
java.util.Iterator<IGroup> getAccessibleGroups()
IApplicationPermission getApplicationPermission(Id id)
id
- (required) ApplicationPermission IdIApplicationPermission getApplicationPermission(java.lang.String name)
name
- (required) name of the ApplicationPermissionjava.util.List<IApplicationPermission> getApplicationPermissions()
boolean hasPermission(IApplicationPermission applicationPermission)
applicationPermission
- (required)java.util.Iterator<IRoleAssignment> getRoleAssignments()
java.util.Iterator<IRoleAssignment> getRoleAssignments(ISecurityPrincipal userOrGroup, IRoleTemplate roleTemplate, IFolder folder)
IRoleAssignment getRoleAssignment(Id id)
id
- (required) RoleAssignment IdIUser getCurrentUser()
java.util.List<IAdminPermission> getAdminPermissions(java.util.List<Id> groupIds, java.util.List<Id> administratorIds)
groupIds
- the list of securable group idsadministratorIds
- the list of administrator idsboolean isUser(Id id)
id
- the Id for the SecurityPrincipal, which may be either an user or groupboolean isSuperAdministrator(IUser user)
Checks whether the user is a system designated Super Administrator. The Super Administrator (specified during the install or upgrade process) is a user who has complete access to all objects, folders, Role Templates, and groups in the system. By default the super user will be the OpenPagesAdministrator on most systems.
For more information on super administrators see the About Administrators section in the IBM OpenPages with Watson Administrators Guideuser
- user to check for super administrator statusjava.util.List<Id> getActorImpersonates(Id actorId)
Find all actors, users or groups, that the given actor impersonates.
Actors impersonate from direct and indirect group memberships and role assignments (represented through internal System created groups). From a folder-based security perspective, a user inherits all the permissions for all the groups it impersonates.
actorId
- the Id of the actor to get what actors it impersonates
Licensed Materials - Property of IBM
OpenPages with Watson (PID: 5725-D51)
© Copyright IBM Corporation 2013, 2020. All Rights Reserved.
US Government Users Restricted Rights -
Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.