com.atlassian.confluence.security
Interface PermissionDelegate

All Known Implementing Classes:
AbstractPermissionsDelegate, ApplicationPermissionsDelegate, AttachmentPermissionsDelegate, BlogPostPermissionsDelegate, CommentPermissionsDelegate, ContentPropertyPermissionDelegate, DraftPermissionsDelegate, DummyPermissionDelegate, GlobalDescriptionPermissionsDelegate, GroupPermissionsDelegate, LabellingPermissionsDelegate, LinkPermissionsDelegate, MailPermissionsDelegate, MailPermissionsDelegate, PagePermissionsDelegate, PageTemplatePermissionsDelegate, PeopleDirectoryPermissionsDelegate, PersonalInformationPermissionsDelegate, SpaceDescriptionPermissionsDelegate, SpaceGroupPermissionsDelegate, SpacePermissionsDelegate, StatusPermissionDelegate, SystemPermissionsDelegate, TargetToLatestVersionDecorator, UserPermissionsDelegate

public interface PermissionDelegate

Each type of target that can have permissions checked against it will have a delegate. The delegate's job is to separate out the different permissions checks in a cleaner, more maintainable fashion.


Method Summary
 boolean canAdminister(com.atlassian.user.User user, Object target)
           
 boolean canCreate(com.atlassian.user.User user, Object container)
           
 boolean canCreateInTarget(com.atlassian.user.User user, Class typeToCreate)
           
 boolean canEdit(com.atlassian.user.User user, Object target)
           
 boolean canExport(com.atlassian.user.User user, Object target)
           
 boolean canRemove(com.atlassian.user.User user, Object target)
           
 boolean canSetPermissions(com.atlassian.user.User user, Object target)
           
 boolean canView(com.atlassian.user.User user)
           
 boolean canView(com.atlassian.user.User user, Object target)
           
 

Method Detail

canView

boolean canView(com.atlassian.user.User user,
                Object target)
Returns:
true if user can view the specified target.

canView

boolean canView(com.atlassian.user.User user)
Returns:
true if the user can view all instances of targets handled by this permission delegate

canEdit

boolean canEdit(com.atlassian.user.User user,
                Object target)

canSetPermissions

boolean canSetPermissions(com.atlassian.user.User user,
                          Object target)

canRemove

boolean canRemove(com.atlassian.user.User user,
                  Object target)

canExport

boolean canExport(com.atlassian.user.User user,
                  Object target)

canAdminister

boolean canAdminister(com.atlassian.user.User user,
                      Object target)

canCreate

boolean canCreate(com.atlassian.user.User user,
                  Object container)
Returns:
true if the specified user can create new instances of the target type in the specified container.

canCreateInTarget

boolean canCreateInTarget(com.atlassian.user.User user,
                          Class typeToCreate)
Parameters:
user - the user performing the create
typeToCreate - the class of the entity to create
Returns:
true if the specified user can create new instances of the specified typeToCreate within instances of target handled by this PermissionDelegate.


Copyright © 2003–2015 Atlassian. All rights reserved.