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.
|
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) |
List<Page> |
getPermittedChildren(Page page,
com.atlassian.user.User user) |
Set<ContentPermission> |
getViewContentPermissions(Page page)
Deprecated.
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
ContentPermissions passed. |
void |
setContentPermissions(Map<String,Collection<ContentPermission>> requiredPermissionsMap,
ContentEntityObject content)
Set the Content Permissions on the CEO to be the list of
ContentPermissions passed. |
void addContentPermission(ContentPermission permission, ContentEntityObject content)
permission - content - void setContentPermissions(Collection<ContentPermission> contentPermissions, ContentEntityObject content, String type)
ContentPermissions passed. Passing
an empty list removes all permissions. Passing a list containing just the existing permissions does nothing.contentPermissions - set of ContentPermissionscontent - type - void setContentPermissions(@Nonnull Map<String,Collection<ContentPermission>> requiredPermissionsMap, ContentEntityObject content)
ContentPermissions 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 ContentPermissions 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)
ContentPermissionSets 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_PERMISSIONboolean hasPermittedChildrenIgnoreInheritedPermissions(Page page, com.atlassian.user.User remoteUser)
@Deprecated Set<ContentPermission> getViewContentPermissions(Page page)
getContentPermissionSets(ContentEntityObject, String) passing permission type ContentPermission.VIEW_PERMISSIONpage - 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.ContentPermissionSets. 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_PERMISSIONContentPermissionSets. Not null, but can be empty.boolean isPermissionInherited(Page childPage)
childPage - Copyright © 2003–2016 Atlassian. All rights reserved.