Package org.gbif.api.model.common
Class UserPrincipal
- java.lang.Object
-
- org.gbif.api.model.common.UserPrincipal
-
- All Implemented Interfaces:
Principal
@Deprecated public class UserPrincipal extends Object implements Principal
Deprecated.replaced byGbifUserPrincipal
A wrapper class for a GBIF User that exposes the unique account name as the principal name.
-
-
Constructor Summary
Constructors Constructor Description UserPrincipal(User user)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
getName()
Deprecated.User
getUser()
Deprecated.boolean
hasRole(String role)
Deprecated.Checks if the user has the given string based role.
-
-
-
Constructor Detail
-
UserPrincipal
public UserPrincipal(User user)
Deprecated.
-
-
Method Detail
-
hasRole
public boolean hasRole(String role)
Deprecated.Checks if the user has the given string based role. We use strings here and not the enum to facilitate the use of the method with the standard SecurityContext which uses Strings for roles.- Parameters:
role
- case insensitive role- Returns:
- true if the user has the requested role
-
-