|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PermissionManager
Generalised interface for checking whether a particular action in Confluence is allowed, without any knowledge of the specific implementation of permissions as they relate to spaces, pages and so on.
Field Summary | |
---|---|
static Object |
GLOBAL_PERMISSION
A target to represent the Confluence application as a whole, for global tests |
Method Summary | |
---|---|
List |
filterPermittedEntities(User user,
Permission permission,
Iterator objects,
int maxResults)
Filter an iterator based on which entities in the list have a particular permission. |
List |
filterPermittedEntities(User user,
Permission permission,
List objects)
Filter a list based on which entities in the list have a particular permission. |
boolean |
hasPermission(User user,
Permission permission,
Object target)
Determine whether a user has a particular permission against a given target. |
Field Detail |
---|
static final Object GLOBAL_PERMISSION
Method Detail |
---|
boolean hasPermission(User user, Permission permission, Object target)
user
- the user seeking permission, or null if the anonymous user is being checked againstpermission
- the permission to checktarget
- the object that the permission is being checked against. If this object is null, the method
will return false
IllegalStateException
- if the permission being checked against does not apply to the targetList filterPermittedEntities(User user, Permission permission, List objects)
user
- the user seeking permission, or null if the anonymous user is being checked againstpermission
- the permission to check against the objectsobjects
- the objects to check
List filterPermittedEntities(User user, Permission permission, Iterator objects, int maxResults)
user
- the user seeking permission, or null if the anonymous user is being checked againstpermission
- the permission to check against the objectsobjects
- the objects to checkmaxResults
- the maximum number of permitted entities to retrieve from the iterator (un-permitted entities
are not counted)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |