public class LightAdminPrivileges extends Object
Constructor and Description |
---|
LightAdminPrivileges(Roles roles) |
Modifier and Type | Method and Description |
---|---|
static com.google.common.collect.ImmutableSet<AdminPrivilege> |
getAllPrivileges() |
String |
getConfigNameForPrivilege(AdminPrivilege privilege) |
AdminPrivilege |
getPrivilege(String value) |
AdminPrivilege |
getPrivilegeForConfigName(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(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 String getConfigNameForPrivilege(AdminPrivilege privilege)
privilege
- a light administrator privilegeExperimenter.config.name
public AdminPrivilege getPrivilege(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.0-ice35-b74
Copyright © 2017 The University of Dundee & Open Microscopy Environment. All Rights Reserved.