Package ch.ivyteam.ivy.security.role
Interface IRoleRepository
-
public interface IRoleRepository
Role repository to find and delete roles.
New roles can be created by using the method
topLevel()
to get the top level role and thenIRole.createChildRole(String, String, String, boolean)
to create a new child role of the top level role (Everybody).- Since:
- 9.3
- API:
- This is a public API.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<IRole>
active()
List<IRole>
all()
int
count()
Count all rolesvoid
delete(String roleName)
Delete the role with the given roleName.IRole
find(String roleName)
Finds a role by its nameIRole
topLevel()
-
-
-
Method Detail
-
delete
void delete(String roleName)
Delete the role with the given roleName. If the role does not exists this method does nothing.- Parameters:
roleName
- name of the role- See Also:
IRole.delete()
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
find
IRole find(String roleName)
Finds a role by its name- Parameters:
roleName
- The name of a role- Returns:
- role or null if no role was found
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
- Security:
- SESSION OWNS RoleReadAll PERMISSION OR OWNS RoleReadAll@SYSTEM PERMISSION
-
topLevel
IRole topLevel()
- Returns:
- top level role (Everybody)
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
- Security:
- SESSION OWNS RoleReadAll PERMISSION OR OWNS RoleReadAll@SYSTEM PERMISSION
-
all
List<IRole> all()
- Returns:
- All roles. Flat without any hierarchy, but the child roles of a role are always behind the parent role.
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
- Security:
- SESSION OWNS RoleReadAll PERMISSION OR OWNS RoleReadAll@SYSTEM PERMISSION
-
active
List<IRole> active()
- Returns:
- all roles which could be actively used by the system. Flat without any hierarchy, but the
child roles of a role are always behind the parent role.
In comparison toall()
,roles
will be excluded, which only exists in outdated Process Model Versions. - API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
count
int count()
Count all roles- Returns:
- role count
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
-