com.ibm.portal.ac
Interface AccessControlGlobalRuntimeModel


public interface AccessControlGlobalRuntimeModel

The AccessControlGlobalRuntimeModel provides read access to the current access control permissions on any resource that is registered at Portal Access Control. Use this interface to evaluate if the current user or any other user has been assigned a defined set of privileges.

Since:
6.1.0.3
See Also:
Permission

Method Summary
 boolean hasPermission(Permission p)
          This method calculates if the current user has been granted at least the given permission.
 boolean hasPermission(Principal principal, Permission p)
          This method calculates if the given principal has been granted at least the given permission.
 boolean hasPermission(Principal principal, java.util.Set<Permission> p)
          This method calculates if the given principal has been granted at least the given set of permissions.
 boolean hasPermission(java.util.Set<Permission> p)
          This method calculates if the current user has been granted at least the given set of permission.
 

Method Detail

hasPermission

boolean hasPermission(Permission p)
                      throws AccessControlException,
                             SystemException
This method calculates if the current user has been granted at least the given permission. Both privileges granted directly and on any of the groups that it belongs to are considered. Both explicit privileges on the resource and any of its parents in the resource model are considered (unless blocked by propagation or inheritance blocks).

Parameters:
p - the Permission to be checked
Returns:
true if the current user has been granted at least the given permission.
Throws:
AccessControlException - will be thrown if any access control related error occurs
SystemException - will be thrown if a system resource problem, e.g. a database exception, occurs

hasPermission

boolean hasPermission(java.util.Set<Permission> p)
                      throws AccessControlException,
                             SystemException
This method calculates if the current user has been granted at least the given set of permission. Both privileges granted directly and on any of the groups that it belongs to are considered. Both explicit privileges on the resource and any of its parents in the resource model are considered (unless blocked by propagation or inheritance blocks).

Parameters:
p - the set of Permissions to be checked
Returns:
true if the current user has been granted at least the given permission.
Throws:
AccessControlException - will be thrown if any access control related error occurs
SystemException - will be thrown if a system resource problem, e.g. a database exception, occurs

hasPermission

boolean hasPermission(Principal principal,
                      Permission p)
                      throws AccessControlException,
                             SystemException
This method calculates if the given principal has been granted at least the given permission. Both privileges granted directly and on any of the groups that it belongs to are considered. Both explicit privileges on the resource and any of its parents in the resource model are evaluated (unless blocked by propagation or inheritance blocks).

Parameters:
principal - to check the permissions for
p - the Permission to be checked
Returns:
true if the given principal has been granted at least the given permission.
Throws:
AccessControlException - will be thrown if any access control related error occurs
SystemException - will be thrown if a system resource problem, e.g. a database exception, occurs

hasPermission

boolean hasPermission(Principal principal,
                      java.util.Set<Permission> p)
                      throws AccessControlException,
                             SystemException
This method calculates if the given principal has been granted at least the given set of permissions. Both privileges granted directly and on any of the groups that it belongs to are considered. Both explicit privileges on the resource and any of its parents in the resource model are evaluated (unless blocked by propagation or inheritance blocks).

Parameters:
principal - to check the permissions for
p - the set of Permissions to the checked
Returns:
true if the given principal has been granted at least the given permission.
Throws:
AccessControlException - will be thrown if any access control related error occurs
SystemException - will be thrown if a system resource problem, e.g. a database exception, occurs