Package gda.jython.authoriser
Class FileAuthoriser
java.lang.Object
gda.jython.authoriser.FileAuthoriser
- All Implemented Interfaces:
Authoriser
- Direct Known Subclasses:
LdapAuthoriser
Performs authentication via a file listing usernames and access levels.
-
Field Summary
Fields inherited from interface gda.jython.authoriser.Authoriser
AUTHORISERCLASS_PROPERTY, DEFAULT_AUTHORISER, DEFAULT_LEVEL, DEFAULT_LEVEL_PROPERTY, DEFAULT_STAFF_LEVEL, DEFAULT_STAFF_LEVEL_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds an entry to the filevoiddeleteEntry(String username) Removes an entry from the fileintgetAuthorisationLevel(String username) booleanhasAuthorisationLevel(String username) booleanisLocalStaff(String username) Returns true if the username is a member of facility staff and should have elevated privileges over users.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface gda.jython.authoriser.Authoriser
getDefaultPermissions
-
Constructor Details
-
FileAuthoriser
public FileAuthoriser()
-
-
Method Details
-
getEntries
- Returns:
- Vector of strings of the entries in this file
-
addEntry
Adds an entry to the file- Parameters:
username-newLevel-isStaff-
-
deleteEntry
Removes an entry from the file- Parameters:
username-
-
getAuthorisationLevel
- Specified by:
getAuthorisationLevelin interfaceAuthoriser- Parameters:
username-- Returns:
- the authorisation level for the given username for this GDA installation
-
isLocalStaff
Description copied from interface:AuthoriserReturns true if the username is a member of facility staff and should have elevated privileges over users. Any accounts used for beamline testing/commissioning should also return true when using this method.- Specified by:
isLocalStaffin interfaceAuthoriser- Parameters:
username-- Returns:
- the username is in a separate list for beamline staff
-
hasAuthorisationLevel
-