eitch/Privilege — Issue #3: Add convenience methods so *Rep objects don't need to be created all the time
Author: eitch
Created: 2012-01-27 15:53:02+00:00
State: open

If the certificate is valid, and one would like to know if a user has a certain role, then the UserRep object must be queried and then checked if the user has the role in the set of role names.

So the best thing would be the following convenience methods:

PrivilegeHandler.hasRole(userName, roleName)
PrivilegeHandler.hasPrivilege(userName, privilegeName)

and also on the reps themselves:

UserRep.hasRole(roleName)
RoleRep.hasPrivilege(privilegeName)