public class LightAdminPrivileges
extends java.lang.Object
Constructor and Description |
---|
LightAdminPrivileges(ome.system.Roles roles) |
Modifier and Type | Method and Description |
---|---|
static com.google.common.collect.ImmutableSet<ome.model.enums.AdminPrivilege> |
getAllPrivileges() |
java.lang.String |
getConfigNameForPrivilege(ome.model.enums.AdminPrivilege privilege) |
ome.model.enums.AdminPrivilege |
getPrivilege(java.lang.String value) |
ome.model.enums.AdminPrivilege |
getPrivilegeForConfigName(java.lang.String value) |
com.google.common.collect.ImmutableSet<ome.model.enums.AdminPrivilege> |
getSessionPrivileges(ome.model.meta.Session session)
Determine the light administrator privileges associated with a session.
|
public LightAdminPrivileges(ome.system.Roles roles)
roles
- the OMERO rolespublic static com.google.common.collect.ImmutableSet<ome.model.enums.AdminPrivilege> getAllPrivileges()
public ome.model.enums.AdminPrivilege getPrivilegeForConfigName(java.lang.String value)
value
- the string value of a light administrator privilege as recorded in Experimenter.config.name
null
if there is no privilege with that string valuepublic java.lang.String getConfigNameForPrivilege(ome.model.enums.AdminPrivilege privilege)
privilege
- a light administrator privilegeExperimenter.config.name
public ome.model.enums.AdminPrivilege getPrivilege(java.lang.String value)
value
- the string value of a light administrator privilegenull
if there is no privilege with that string valuepublic com.google.common.collect.ImmutableSet<ome.model.enums.AdminPrivilege> getSessionPrivileges(ome.model.meta.Session session)
sudo, takes that into account. Does not take account of if the relevant user is a member of system: calculates assuming that the user is an administrator. Caches newly fetched privileges for future lookups.
session
- an OMERO session