public class LightAdminPrivileges
extends java.lang.Object
Constructor and Description |
---|
LightAdminPrivileges(Roles roles) |
Modifier and Type | Method and Description |
---|---|
static com.google.common.collect.ImmutableSet<AdminPrivilege> |
getAllPrivileges() |
java.lang.String |
getConfigNameForPrivilege(AdminPrivilege privilege) |
AdminPrivilege |
getPrivilege(java.lang.String value) |
AdminPrivilege |
getPrivilegeForConfigName(java.lang.String value) |
com.google.common.collect.ImmutableSet<AdminPrivilege> |
getSessionPrivileges(Session session)
Determine the light administrator privileges associated with a session.
|
public LightAdminPrivileges(Roles roles)
roles
- the OMERO rolespublic static com.google.common.collect.ImmutableSet<AdminPrivilege> getAllPrivileges()
public 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(AdminPrivilege privilege)
privilege
- a light administrator privilegeExperimenter.config.name
public 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<AdminPrivilege> getSessionPrivileges(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
Version: 5.4.4-ice35-b82
Copyright © 2018 The University of Dundee & Open Microscopy Environment. All Rights Reserved.