Package nxt.authentication
Class RoleMapperFactory.NullRoleMapper
java.lang.Object
nxt.authentication.RoleMapperFactory.NullRoleMapper
- All Implemented Interfaces:
RoleMapper
- Enclosing class:
- RoleMapperFactory
Dummy role mapper for a non-permissioned blockchain
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetUserRoles(String rsAccount) Get the user roles for the supplied Nxt accountbooleanisUserInRole(long accountId, Role role) Check if the supplied Nxt account has the specified user rolebooleanisValidRoleSetter(long setterId) Check if the supplied Nxt account is allowed to set user roles.parseRoles(String value) Parse the account property string containing the user roles.
-
Constructor Details
-
NullRoleMapper
public NullRoleMapper()
-
-
Method Details
-
getUserRoles
Description copied from interface:RoleMapperGet the user roles for the supplied Nxt account- Specified by:
getUserRolesin interfaceRoleMapper- Parameters:
rsAccount- Nxt account- Returns:
- Set of user roles
-
isValidRoleSetter
public boolean isValidRoleSetter(long setterId) Description copied from interface:RoleMapperCheck if the supplied Nxt account is allowed to set user roles. An account must have the ADMIN role in order to set user roles.- Specified by:
isValidRoleSetterin interfaceRoleMapper- Parameters:
setterId- Account setting the user roles- Returns:
- TRUE if the account is allowed to set user roles
-
isUserInRole
Description copied from interface:RoleMapperCheck if the supplied Nxt account has the specified user role- Specified by:
isUserInRolein interfaceRoleMapper- Parameters:
accountId- Account identifierrole- User role- Returns:
- TRUE if the account has the specified user role
-
parseRoles
Description copied from interface:RoleMapperParse the account property string containing the user roles. Multiple roles can be specified separated by commas.- Specified by:
parseRolesin interfaceRoleMapper- Parameters:
value- User roles- Returns:
- Set of user roles
-