Package org.jboss.hal.config
Class User
- java.lang.Object
-
- org.jboss.hal.config.User
-
public class User extends Object
Holds information about an user.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRole(Role role)static Usercurrent()StringgetName()Set<Role>getRoles()booleanisAdministrator()booleanisAuthenticated()booleanisSuperuser()voidrefreshRoles(Set<Role> roles)voidsetAuthenticated(boolean authenticated)voidsetName(String name)
-
-
-
Method Detail
-
current
public static User current()
- Returns:
- the current user.
-
getName
public String getName()
- Returns:
- the user name.
-
setName
public void setName(String name)
-
addRole
public void addRole(Role role)
-
isSuperuser
public boolean isSuperuser()
- Returns:
- true if this user belongs to the role SuperUser, false otherwise.
-
isAdministrator
public boolean isAdministrator()
- Returns:
- true if this user belongs to the role Administrator, false otherwise.
-
isAuthenticated
public boolean isAuthenticated()
-
setAuthenticated
public void setAuthenticated(boolean authenticated)
-
-