public interface ContentPermissionManager
Modifier and Type | Method and Description |
---|---|
void |
addContentPermission(ContentPermission permission,
ContentEntityObject content)
Add permissions to the content entity objecct through the manager.
|
void |
copyContentPermissions(AbstractPage from,
AbstractPage to)
Deprecated.
since 5.10.1 use
copyContentPermissions(ContentEntityObject, ContentEntityObject) |
void |
copyContentPermissions(ContentEntityObject from,
ContentEntityObject to)
Copies all content permissions from one content entity to another.
|
List<ContentPermissionSet> |
getContentPermissionSets(ContentEntityObject ceo,
String type)
Get the ContentPermissionSets that affect this ceo, both inherited and directly.
|
List<ContentPermission> |
getInheritedContentPermissions(ContentEntityObject contentEntityObject)
Deprecated.
Since 2.6 use
getInheritedContentPermissionSets(ContentEntityObject) |
List<ContentPermissionSet> |
getInheritedContentPermissionSets(ContentEntityObject contentEntityObject) |
List<ContentPermissionSet> |
getInheritedContentPermissionSets(ContentEntityObject contentEntityObject,
boolean includeEditPermissions)
Get the inherited ContentPermissionSets that affect this ceo.
|
List<ContentPermission> |
getInheritedContentUserPermissions(ContentEntityObject contentEntityObject) |
Map<Long,Boolean> |
getPermissionSets(com.atlassian.user.User user,
Space space)
Retrieves the configured permissions regarding whether the specified user can view the pages inside a space.
|
List<Page> |
getPermittedChildren(Page page,
com.atlassian.user.User user)
Returns a list of
Page objects that are direct children of the passed in page. |
List<Page> |
getPermittedChildrenIgnoreInheritedPermissions(Page page,
com.atlassian.user.User user)
Gets the list of child pages under the given page that are visible to the given user.
|
Set<ContentPermission> |
getViewContentPermissions(Page page)
Deprecated.
since 5.8. use
getContentPermissionSets(ContentEntityObject, String) passing permission type ContentPermission.VIEW_PERMISSION |
boolean |
hasContentLevelPermission(com.atlassian.user.User user,
String permissionType,
ContentEntityObject content)
fetches the inherited and explicit content level permissions for this content object and determines whether the user has access.
|
boolean |
hasPermittedChildrenIgnoreInheritedPermissions(Page page,
com.atlassian.user.User remoteUser)
Does the given page have children visible to the given user.
|
boolean |
isPermissionInherited(Page childPage)
Does the child page get its permissions from any ancestor?
|
void |
removeAllGroupPermissions(String groupName)
Remove all content permission associated with a given group.
|
void |
removeAllUserPermissions(ConfluenceUser user)
Remove all content permission associated with a given user.
|
void |
removeAllUserPermissions(String username)
Deprecated.
since 5.3. Use
removeAllUserPermissions(com.atlassian.confluence.user.ConfluenceUser)
instead. |
void |
removeContentPermission(ContentPermission permission) |
void |
setContentPermissions(Collection<ContentPermission> contentPermissions,
ContentEntityObject content,
String type)
Set the Content Permissions on the CEO to be the list of
ContentPermission s passed. |
void |
setContentPermissions(Map<String,Collection<ContentPermission>> requiredPermissionsMap,
ContentEntityObject content)
Set the Content Permissions on the CEO to be the list of
ContentPermission s passed. |
void addContentPermission(ContentPermission permission, ContentEntityObject content)
permission
- content
- void setContentPermissions(Collection<ContentPermission> contentPermissions, ContentEntityObject content, String type)
ContentPermission
s passed. Passing
an empty list removes all permissions. Passing a list containing just the existing permissions does nothing.contentPermissions
- set of ContentPermission
scontent
- type
- void setContentPermissions(@Nonnull Map<String,Collection<ContentPermission>> requiredPermissionsMap, ContentEntityObject content)
ContentPermission
s passed. Passing
an empty list removes all permissions. Passing a list containing just the existing permissions does nothing.
It is recommended to use this method for setting different types of content permissions in a batch, because
it performs more smart and performant caching updates than setContentPermissions(java.util.Collection, ContentEntityObject, String)
doesrequiredPermissionsMap
- - map of ContentPermission
s for each typecontent
- void removeContentPermission(ContentPermission permission)
void removeAllGroupPermissions(String groupName)
groupName
- void removeAllUserPermissions(ConfluenceUser user)
user
- @Deprecated void removeAllUserPermissions(String username)
removeAllUserPermissions(com.atlassian.confluence.user.ConfluenceUser)
instead.username
- @Deprecated List<ContentPermission> getInheritedContentPermissions(ContentEntityObject contentEntityObject)
getInheritedContentPermissionSets(ContentEntityObject)
List<ContentPermission> getInheritedContentUserPermissions(ContentEntityObject contentEntityObject)
List<ContentPermissionSet> getInheritedContentPermissionSets(ContentEntityObject contentEntityObject)
ContentPermissionSet
s of type
ContentPermission.VIEW_PERMISSION
of all ancestors of contentEntityObjectboolean hasContentLevelPermission(com.atlassian.user.User user, String permissionType, ContentEntityObject content)
permissionType
- ContentPermission.VIEW_PERMISSION
or ContentPermission.EDIT_PERMISSION
List<Page> getPermittedChildren(Page page, com.atlassian.user.User user)
Page
objects that are direct children of the passed in page.
This method will only return the children the passed in user has permission to view.boolean hasPermittedChildrenIgnoreInheritedPermissions(Page page, com.atlassian.user.User remoteUser)
List<Page> getPermittedChildrenIgnoreInheritedPermissions(Page page, com.atlassian.user.User user)
@Deprecated Set<ContentPermission> getViewContentPermissions(Page page)
getContentPermissionSets(ContentEntityObject, String)
passing permission type ContentPermission.VIEW_PERMISSION
page
- List<ContentPermissionSet> getInheritedContentPermissionSets(ContentEntityObject contentEntityObject, boolean includeEditPermissions)
contentEntityObject
- whose permissions will be returned. Not null.includeEditPermissions
- which specifies whether or not edit permissions should be additionally treated as view permissions.ContentPermissionSet
s. Not null, but can be empty.List<ContentPermissionSet> getContentPermissionSets(ContentEntityObject ceo, String type)
ceo
- whose permissions will be returned. Not null.type
- one of ContentPermission.VIEW_PERMISSION
or ContentPermission.EDIT_PERMISSION
ContentPermissionSet
s. Not null, but can be empty.boolean isPermissionInherited(Page childPage)
childPage
- @Deprecated void copyContentPermissions(AbstractPage from, AbstractPage to)
copyContentPermissions(ContentEntityObject, ContentEntityObject)
void copyContentPermissions(ContentEntityObject from, ContentEntityObject to)
Map<Long,Boolean> getPermissionSets(com.atlassian.user.User user, Space space)
user
- - confluence user to be checkedspace
- - confluence spaceCopyright © 2003–2018 Atlassian. All rights reserved.