/** * @param granteeId * @param permission * @return true if the grantee has the given permission. */ public boolean hasPermission(String granteeId, Permission permission) { return getPermissions(granteeId).contains(permission); }
/** * @param granteeURI * @return the permissions assigned to a group grantee. */ public Collection<Permission> getPermissions(GroupGranteeURI granteeURI) { return getPermissions(granteeURI.getIdentifier()); }
/** * @param grantee * @return the permissions assigned to a grantee. */ public Collection<Permission> getPermissions(Grantee grantee) { return getPermissions(grantee.getIdentifier()); }
/** * @param granteeURI * @param permission * @return true if the grantee has the given permission. */ public boolean hasPermission(GroupGranteeURI granteeURI, Permission permission) { return getPermissions(granteeURI.getIdentifier()).contains(permission); }