com.atlassian.jira.security
Interface GlobalPermissionManager

All Known Implementing Classes:
DefaultGlobalPermissionManager

public interface GlobalPermissionManager


Method Summary
 boolean addPermission(int permissionType, String group)
          Adds a global permission
 Collection getGroups(int permissionId)
          Retrieve all the groups with this permission
 Collection getPermissions(int permissionType)
          Retrieve all the global permissions of a particular type
 boolean hasPermission(int permissionType)
          Check if a global anonymous permission exists
 boolean hasPermission(int permissionId, String group)
          Check if a global permission for one of the groups
 boolean hasPermission(int permissionType, User u)
          Check if a global permission for one of the users groups exists
 boolean removePermission(int permissionType, String group)
          Removes a global permission
 boolean removePermissions(String group)
          Remove a global permissions that the group passed in
 

Method Detail

addPermission

public boolean addPermission(int permissionType,
                             String group)
                      throws CreateException
Adds a global permission

Parameters:
permissionType - must be a global permission type
group - can be null if it is anyone permission
Returns:
True if the permission was added
Throws:
CreateException

getPermissions

public Collection getPermissions(int permissionType)
Retrieve all the global permissions of a particular type

Parameters:
permissionType - must be a global permission
Returns:
Collection of JiraPermission

removePermission

public boolean removePermission(int permissionType,
                                String group)
                         throws RemoveException
Removes a global permission

Parameters:
permissionType - must be a global permission type
group - can be null if it is anyone permission
Returns:
True if the permission was removed, false if not (usually it didn't exist)
Throws:
RemoveException

removePermissions

public boolean removePermissions(String group)
                          throws RemoveException
Remove a global permissions that the group passed in

Parameters:
group - must NOT be null and the group must exist
Returns:
True all the permissions are removed
Throws:
RemoveException

hasPermission

public boolean hasPermission(int permissionType)
Check if a global anonymous permission exists

Parameters:
permissionType - must be global permission

hasPermission

public boolean hasPermission(int permissionType,
                             User u)
Check if a global permission for one of the users groups exists

Parameters:
permissionType - must be a global permission
u - must not be null

hasPermission

public boolean hasPermission(int permissionId,
                             String group)
Check if a global permission for one of the groups

Parameters:
permissionId - must be a global permission
group - name

getGroups

public Collection getGroups(int permissionId)
Retrieve all the groups with this permission

Parameters:
permissionId - must be a global permission


Copyright © 2002-2006 Atlassian. All Rights Reserved.