com.atlassian.confluence.security.delegate
Class UserPermissionsDelegate

java.lang.Object
  extended by com.atlassian.confluence.security.delegate.UserPermissionsDelegate
All Implemented Interfaces:
PermissionDelegate

public class UserPermissionsDelegate
extends java.lang.Object
implements PermissionDelegate

Class for checking operations on users.


Constructor Summary
UserPermissionsDelegate()
           
 
Method Summary
 boolean canAdminister(com.atlassian.user.User user, java.lang.Object target)
          Unsupported.
 boolean canCreate(com.atlassian.user.User user, java.lang.Object container)
          Determines if the specified user has permissions to create users
 boolean canEdit(com.atlassian.user.User user, java.lang.Object target)
          Determines if the specified user can edit the target user.
 boolean canExport(com.atlassian.user.User user, java.lang.Object target)
          Unsupported.
 boolean canRemove(com.atlassian.user.User user, java.lang.Object target)
          Determines if the specified user can remove the target user.
 boolean canSetPermissions(com.atlassian.user.User user, java.lang.Object target)
          Determines if the specified user can add new permissions or remove existing permissions on the target user.
 boolean canView(com.atlassian.user.User user, java.lang.Object target)
          Determines if the specified user can view the target user.
 void setSpacePermissionManager(SpacePermissionManager spacePermissionManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserPermissionsDelegate

public UserPermissionsDelegate()
Method Detail

canView

public boolean canView(com.atlassian.user.User user,
                       java.lang.Object target)
Determines if the specified user can view the target user.

Specified by:
canView in interface PermissionDelegate
Returns:
true, always. That is, any user specified can view any target.

canEdit

public boolean canEdit(com.atlassian.user.User user,
                       java.lang.Object target)
Determines if the specified user can edit the target user. A user can always edit themselves. Confluence administrators and System administrators can edit users. The exception to this is that, only system administrators can edit other system administrators.

Specified by:
canEdit in interface PermissionDelegate
Returns:
true if the specified user can edit the target user. false otherwise.

canRemove

public boolean canRemove(com.atlassian.user.User user,
                         java.lang.Object target)
Determines if the specified user can remove the target user. Confluence administrators and System administrators can remove users. The exception to this is that, only system administrators can remove other system administrators.

Specified by:
canRemove in interface PermissionDelegate
Returns:
true if the specified user can remove the target user. false otherwise.

canCreate

public boolean canCreate(com.atlassian.user.User user,
                         java.lang.Object container)
Determines if the specified user has permissions to create users

Specified by:
canCreate in interface PermissionDelegate
Parameters:
container - not required. Null can be specified here as it is not used at the moment.
Returns:
true if the specified user has permissions to create users.

canExport

public boolean canExport(com.atlassian.user.User user,
                         java.lang.Object target)
Unsupported.

Specified by:
canExport in interface PermissionDelegate

canSetPermissions

public boolean canSetPermissions(com.atlassian.user.User user,
                                 java.lang.Object target)
Determines if the specified user can add new permissions or remove existing permissions on the target user. Confluence administrators and System administrators can set permissions on users. The exception to this is that, only system administrators can set permissions on other system administrators.

Specified by:
canSetPermissions in interface PermissionDelegate
Returns:
true if the specified user can set permissions on the target user. false otherwise.

canAdminister

public boolean canAdminister(com.atlassian.user.User user,
                             java.lang.Object target)
Unsupported.

Specified by:
canAdminister in interface PermissionDelegate

setSpacePermissionManager

public void setSpacePermissionManager(SpacePermissionManager spacePermissionManager)


Copyright © 2003-2009 Atlassian Pty Ltd. All Rights Reserved.