Package jmri
Interface User
- All Known Implementing Classes:
DefaultUser
public interface User
An user in the permission system.
-
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanchangePassword(String oldPassword, String newPassword) booleanensureAtLeastPermission(Permission permission, PermissionValue minValue) Checks if the current user has the permission.getName()intgetRoles()booleanhasAtLeastPermission(Permission permission, PermissionValue minValue) booleanIs the user allowed to change his password?booleanvoidremoveRole(Role role) voidsetComment(String comment) voidvoidsetPassword(String newPassword)
-
Method Details
-
getUserName
-
isSystemUser
boolean isSystemUser() -
getPriority
int getPriority() -
setPassword
-
isPermittedToChangePassword
boolean isPermittedToChangePassword()Is the user allowed to change his password?- Returns:
- true if the user is allowed to change his password, false otherwise.
-
changePassword
-
getName
-
setName
-
getComment
-
setComment
-
getRoles
-
addRole
-
removeRole
-
hasAtLeastPermission
-
ensureAtLeastPermission
Checks if the current user has the permission. If not, show a message dialog if not headless. Otherwise log a message.- Parameters:
permission- the permission to checkminValue- the minimum value- Returns:
- true if the user has the permission, false otherwise
-