examples.access
Class AccessRightsChecker
java.lang.Object
examples.access.AccessRightsChecker
public class AccessRightsChecker
- extends Object
As the name indicates, checks whether a user possesses a given permission.
AccessRightsChecker is also a stand-alone java application, simulating a very
simple and short simulation of invocation of a AccessRightsChecker
- Author:
- Ceki Gulcu
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AccessRightsChecker
public AccessRightsChecker(PermissionMap permissionMap)
hasPermission
public boolean hasPermission(User user,
Permission permission)
throws AccessException
- Does the user have the permission passed as parameter?
- Parameters:
user - the user to check againstpermission - the permission to check
- Returns:
- true if the user has the permission, false otherwise.
- Throws:
AccessException - thrown if there is a problem checking user permissions
main
public static void main(String[] args)
throws ch.qos.logback.audit.AuditException,
AccessException
- Throws:
ch.qos.logback.audit.AuditException
AccessException
Copyright © 2013. All Rights Reserved.