Modifier and Type | Method and Description |
---|---|
void |
addAdminPrivileges(SecurityContext ctx,
ExperimenterData user,
java.util.Collection<java.lang.String> privileges)
Grant an user additional admin privileges.
|
ExperimenterData |
createExperimenter(SecurityContext ctx,
ExperimenterData exp,
java.lang.String username,
java.lang.String password,
java.util.List<GroupData> groups,
boolean isAdmin,
boolean isGroupOwner)
Creates an experimenter and returns it.
|
ExperimenterData |
createExperimenter(SecurityContext ctx,
ExperimenterData exp,
java.lang.String username,
java.lang.String password,
java.util.List<GroupData> groups,
boolean isAdmin,
boolean isGroupOwner,
java.util.List<java.lang.String> privileges)
Creates an experimenter and returns it.
|
GroupData |
createGroup(SecurityContext ctx,
GroupData groupData,
ExperimenterData owner,
int permissions)
Creates a group and returns it.
|
java.util.Collection<java.lang.String> |
getAdminPrivileges(SecurityContext ctx)
Get the logged in user's admin privileges
(see omero.model.enums)
|
java.util.Collection<java.lang.String> |
getAdminPrivileges(SecurityContext ctx,
ExperimenterData user)
Get the admin privileges of a certain user
(see omero.model.enums)
|
java.util.Collection<java.lang.String> |
getAvailableAdminPrivileges(SecurityContext ctx)
Get all available admin privileges
|
boolean |
isFullAdmin(SecurityContext ctx)
Checks if the currently logged in user has full admin privileges
|
boolean |
isFullAdmin(SecurityContext ctx,
ExperimenterData user)
Checks if a user has full admin privileges
|
ExperimenterData |
lookupExperimenter(SecurityContext ctx,
java.lang.String name)
Returns the experimenter corresponding to the passed name or
null . |
GroupData |
lookupGroup(SecurityContext ctx,
java.lang.String name)
Returns the group corresponding to the passed name or
null . |
void |
removeAdminPrivileges(SecurityContext ctx,
ExperimenterData user,
java.util.Collection<java.lang.String> privileges)
Revoke admin privileges for a user
|
void |
setAdminPrivileges(SecurityContext ctx,
ExperimenterData user,
java.util.Collection<java.lang.String> privileges)
Set the admin privileges of a certain user
(see omero.model.enums)
|
addPropertyChangeListener, clear, firePropertyChanged, firePropertyChanged, getFacility, logDebug, logError, logInfo, logWarn, removePropertyChangeListener
public GroupData createGroup(SecurityContext ctx, GroupData groupData, ExperimenterData owner, int permissions) throws DSOutOfServiceException, DSAccessException
ctx
- The security context.groupData
- Host information about the group to create.owner
- The owner of the group.permissions
- The group's permissions.DSOutOfServiceException
- If the connection is broken, or not logged in.DSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.public ExperimenterData createExperimenter(SecurityContext ctx, ExperimenterData exp, java.lang.String username, java.lang.String password, java.util.List<GroupData> groups, boolean isAdmin, boolean isGroupOwner) throws DSOutOfServiceException, DSAccessException
ctx
- The security context.exp
- The experimenter to create.username
- The user name to use.password
- The password to use.groups
- The groups to add the user to.isAdmin
- Pass true
if the user is an administrator,
false
otherwise.isGroupOwner
- Pass true
if the user is a group owner,
false
otherwise.DSOutOfServiceException
- If the connection is broken, or not logged in.DSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.public ExperimenterData createExperimenter(SecurityContext ctx, ExperimenterData exp, java.lang.String username, java.lang.String password, java.util.List<GroupData> groups, boolean isAdmin, boolean isGroupOwner, java.util.List<java.lang.String> privileges) throws DSOutOfServiceException, DSAccessException
ctx
- The security context.exp
- The experimenter to create.username
- The user name to use.password
- The password to use.groups
- The groups to add the user to.isAdmin
- Pass true
if the user is an administrator,
false
otherwise.isGroupOwner
- Pass true
if the user is a group owner,
false
otherwise.privileges
- Only grant these admin privileges (only applies if isAdmin ==
true
); pass an empty list to create a user in
system group but no admin privileges (unspecified or
null
creates full admin with all privileges)DSOutOfServiceException
- If the connection is broken, or not logged in.DSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.public GroupData lookupGroup(SecurityContext ctx, java.lang.String name) throws DSOutOfServiceException, DSAccessException
null
.ctx
- The security context.name
- The name of the group.DSOutOfServiceException
- If the connection is broken, or not logged in.DSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.public ExperimenterData lookupExperimenter(SecurityContext ctx, java.lang.String name) throws DSOutOfServiceException, DSAccessException
null
.ctx
- The security context.name
- The name of the experimenter.DSOutOfServiceException
- If the connection is broken, or not logged in.DSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.public java.util.Collection<java.lang.String> getAdminPrivileges(SecurityContext ctx) throws DSOutOfServiceException, DSAccessException
ctx
- The security context.DSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.public java.util.Collection<java.lang.String> getAdminPrivileges(SecurityContext ctx, ExperimenterData user) throws DSOutOfServiceException, DSAccessException
ctx
- The security context.user
- The user.DSOutOfServiceException
- If the connection is broken, or not logged in.DSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.public void setAdminPrivileges(SecurityContext ctx, ExperimenterData user, java.util.Collection<java.lang.String> privileges) throws DSOutOfServiceException, DSAccessException
ctx
- The security context.user
- The user.privileges
- The admin privileges.DSOutOfServiceException
- If the connection is broken, or not logged in.DSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.public void addAdminPrivileges(SecurityContext ctx, ExperimenterData user, java.util.Collection<java.lang.String> privileges) throws DSOutOfServiceException, DSAccessException
ctx
- The security context.user
- The user.privileges
- The admin privileges to grant.DSOutOfServiceException
- If the connection is broken, or not logged in.DSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.public void removeAdminPrivileges(SecurityContext ctx, ExperimenterData user, java.util.Collection<java.lang.String> privileges) throws DSOutOfServiceException, DSAccessException
ctx
- The security context.user
- The user.privileges
- The admin privileges to revoke.DSOutOfServiceException
- If the connection is broken, or not logged in.DSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.public java.util.Collection<java.lang.String> getAvailableAdminPrivileges(SecurityContext ctx) throws DSOutOfServiceException, DSAccessException
ctx
- The security context.DSOutOfServiceException
- If the connection is broken, or not logged in.DSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.public boolean isFullAdmin(SecurityContext ctx) throws DSOutOfServiceException, DSAccessException
ctx
- The security context.DSOutOfServiceException
- If the connection is broken, or not logged in.DSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.public boolean isFullAdmin(SecurityContext ctx, ExperimenterData user) throws DSOutOfServiceException, DSAccessException
ctx
- The security context.user
- The user.DSOutOfServiceException
- If the connection is broken, or not logged in.DSAccessException
- If an error occurred while trying to retrieve data from OMERO
service.