true
or false
, depending on whether a Permission is allowed for the Subject associated with a supplied WikiSession. The access control algorithm works this way: Note that when iterating through the Acl's list of authorized Principals, it is possible that one or more of the Acl's Principal entries are of type UnresolvedPrincipal
. This means that the last time the ACL was read, the Principal (user, built-in Role, authorizer Role, or wiki Group) could not be resolved: the Role was not valid, the user wasn't found in the UserDatabase, or the Group wasn't known to (e.g., cached) in the GroupManager. If an UnresolvedPrincipal
is encountered, this method will attempt to resolve it first before checking to see if the Subject possesses this principal, by calling {@link #resolvePrincipal(String)}. If the (re-)resolution does not succeed, the access check for the principal will fail by definition (the Subject should never contain UnresolvedPrincipals).
If security not set to JAAS, will return true.
@param session the current wiki session @param permission the Permission being checked @see #hasRoleOrPrincipal(WikiSession,Principal) @return the result of the Permission checkSecurityException
if the requested access, specified by the given permission, is not permitted based on the security policy currently in effect. This method calls AccessController.checkPermission
with the given permission.
@param perm the requested permission.
@exception SecurityException if access is not permitted based onthe current security policy.
@exception NullPointerException if the permission argument isnull
.
@since 1.2
This method quietly returns if the access request is permitted, or throws a suitable AccessControlException otherwise. @param perm the requested permission. @exception AccessControlException if the specified permissionis not permitted, based on the current security policy and the context encapsulated by this object. @exception NullPointerException if the permission to check for is null.
permissions
are granted on the item with the specified id
(i.e. the target item).
@param id the id of the target item
@param permissions A combination of one or more of the following constantsencoded as a bitmask value: READ
WRITE
REMOVE
true
or false
, depending on whether a Permission is allowed for the Subject associated with a supplied WikiSession. The access control algorithm works this way: Note that when iterating through the Acl's list of authorized Principals, it is possible that one or more of the Acl's Principal entries are of type UnresolvedPrincipal
. This means that the last time the ACL was read, the Principal (user, built-in Role, authorizer Role, or wiki Group) could not be resolved: the Role was not valid, the user wasn't found in the UserDatabase, or the Group wasn't known to (e.g., cached) in the GroupManager. If an UnresolvedPrincipal
is encountered, this method will attempt to resolve it first before checking to see if the Subject possesses this principal, by calling {@link #resolvePrincipal(String)}. If the (re-)resolution does not succeed, the access check for the principal will fail by definition (the Subject should never contain UnresolvedPrincipals).
If security not set to JAAS, will return true.
@param session the current wiki session @param permission the Permission being checked @see #hasRoleOrPrincipal(WikiSession,Principal) @return the result of the Permission check
|
|
|
|
|
|
|
|
|
|