public static interface SecurityControl.ScriptBuilder
Each method call on the builder adds a line to the script and then the
script may be built using the script
method which produces a String script which may be sent to the server
using updateStore
.
Such a builder may be created using the
scriptBuilder
method.
From Diffusion 6.5, script builders are no longer immutable. Each builder operation mutates this script builder and returns it.
Modifier and Type | Method and Description |
---|---|
SecurityControl.ScriptBuilder |
append(SecurityControl.ScriptBuilder other)
Append all the operations of
other to this ScriptBuilder. |
SecurityControl.ScriptBuilder |
deisolatePath(String path)
Re-instate inheritance of path permission assignments from parents of
the given path.
|
SecurityControl.ScriptBuilder |
isolatePath(String path)
Set a path not to inherit path permissions from its parent paths or
the default path permissions.
|
SecurityControl.ScriptBuilder |
removePathPermissions(String role,
String path)
Removes any path permissions previously assigned to a particular path
for a given role.
|
String |
script()
Create a script.
|
SecurityControl.ScriptBuilder |
setDefaultPathPermissions(String role,
Set<PathPermission> permissions)
Sets the default path permissions to be assigned to a role.
|
SecurityControl.ScriptBuilder |
setGlobalPermissions(String role,
Set<GlobalPermission> permissions)
Sets the global permissions to be assigned to a role.
|
SecurityControl.ScriptBuilder |
setPathPermissions(String role,
String path,
Set<PathPermission> permissions)
Sets specific path permissions to be assigned for a role for a path.
|
SecurityControl.ScriptBuilder |
setRoleIncludes(String role,
Set<String> includedRoles)
Sets the roles that are to be included within a specified role.
|
SecurityControl.ScriptBuilder |
setRoleLockedByPrincipal(String role,
String lockingPrincipal)
Restrict a role so it can only be edited by a specific principal.
|
SecurityControl.ScriptBuilder |
setRolesForAnonymousSessions(Set<String> roles)
Sets the roles to be assigned by default to all anonymous sessions.
|
SecurityControl.ScriptBuilder |
setRolesForNamedSessions(Set<String> roles)
Sets the roles to be assigned by default to all named sessions.
|
SecurityControl.ScriptBuilder setRolesForAnonymousSessions(Set<String> roles)
roles
- the roles to be assigned to anonymous sessions. This may
be empty which would mean that no roles are to be assigned by
default to anonymous sessions.SecurityControl.ScriptBuilder setRolesForNamedSessions(Set<String> roles)
roles
- the roles to be assigned to all named sessions. This may
be empty which would mean that no roles are to be assigned by
default to named sessions.SecurityControl.ScriptBuilder setGlobalPermissions(String role, Set<GlobalPermission> permissions)
role
- the rolepermissions
- the global permissions to assign to the role. This
set may be empty, in which case the role will be assigned no
global permissions.SecurityControl.ScriptBuilder setDefaultPathPermissions(String role, Set<PathPermission> permissions)
The role will have the given permissions for all paths unless specifically overridden by path-scoped assignments.
role
- the rolepermissions
- the default permissions to assigned to the role.
This may be empty, in which case the role will be
assigned no default path permissions.SecurityControl.ScriptBuilder setPathPermissions(String role, String path, Set<PathPermission> permissions)
role
- the rolepath
- specifies the point in the path hierarchy at which the
permissions are to be applied for the rolepermissions
- the permissions to assign to the role for the
path. This may be empty, in which case the role will have no
permissions to the specified path, which is different from not
having a permission assignment for the path (see
removePathPermissions(String, String)
).SecurityControl.ScriptBuilder isolatePath(String path)
By default, a path without specific
path permission
assignments
inherits the permission assignments from the first
parent path that has them. If neither the path nor any of its parent
paths have permission assignments, the
default path
permissions are used
.
path
- the pathSecurityControl.ScriptBuilder deisolatePath(String path)
path
- the pathisolatePath(String)
SecurityControl.ScriptBuilder removePathPermissions(String role, String path)
This is different from setting no path permissions for the path and role. By removing permissions set for a particular branch of the path hierarchy, the permissions become inherited from assignments made against parent paths in the hierarchy or from the default path permissions.
role
- the role from which to remove path permissionspath
- the path for which permissions are to be removedSecurityControl.ScriptBuilder setRoleIncludes(String role, Set<String> includedRoles)
role
- the roleincludedRoles
- the roles to include. This may be empty, which
would mean that the given role should not include any other
roles.SecurityControl.ScriptBuilder setRoleLockedByPrincipal(String role, String lockingPrincipal)
role
- the rolelockingPrincipal
- the locking principalSecurityControl.ScriptBuilder append(SecurityControl.ScriptBuilder other)
other
to this ScriptBuilder.String script()
Copyright © 2024 DiffusionData Ltd. All Rights Reserved.