com.atlassian.jira.security
Class SubvertedPermissionManager

java.lang.Object
  |
  +--com.atlassian.jira.security.SubvertedPermissionManager
All Implemented Interfaces:
JiraManager, PermissionManager

public class SubvertedPermissionManager
extends java.lang.Object
implements PermissionManager

Returns true for hasPermission, and throws IllegalA


Constructor Summary
SubvertedPermissionManager()
           
 
Method Summary
 void addPermission(int permType, org.ofbiz.core.entity.GenericValue scheme, java.lang.String group)
          Add a permission for a particular project and group
 void addPermission(JiraPermission perm)
          Add a permission using a JiraPermission object
 java.util.Collection getAllGroups(int permType, org.ofbiz.core.entity.GenericValue entity)
          Get all groups that have this permission type, in this project and globally
 java.util.Collection getGlobalPermissions(int permType)
           
 java.util.Collection getGroups(int permType)
          Get a set of groups with this global permission type
 java.util.Collection getPermissions(int permType, org.ofbiz.core.entity.GenericValue entity)
           
 java.util.Collection getProjectGroups(int permType, org.ofbiz.core.entity.GenericValue entity)
          Get a set of groups with this permission type and project
 java.util.Collection getProjects(int permType, java.util.Collection groups)
           
 java.util.Collection getProjects(int permType, com.opensymphony.module.user.User user)
          Get a collection of projects which a user can see (for a given permission)
 java.util.Collection getUsersWithPermission(int permType, org.ofbiz.core.entity.GenericValue entity)
           
 boolean hasGroupsPermission(int permType, org.ofbiz.core.entity.GenericValue entity, java.util.Collection groups)
           
 boolean hasPermission(int permType, org.ofbiz.core.entity.GenericValue project, java.lang.String group)
           
 boolean hasPermission(JiraPermission perm)
           
 boolean hasProjects(int permType, java.util.Collection groups)
           
 boolean hasProjects(int permType, com.opensymphony.module.user.User user)
          Return true if there are any projects which match the given permission and user
 boolean hasUserPermission(int permType, org.ofbiz.core.entity.GenericValue project, com.opensymphony.module.user.User user)
           
 void removeGroupPermissions(java.lang.String group)
           
 boolean removePermission(int permType, org.ofbiz.core.entity.GenericValue scheme, java.lang.String group)
          Remove a permission from a group in a particular scheme
 boolean removePermission(JiraPermission perm)
          Remove a permission
 void removeSchemePermissions(org.ofbiz.core.entity.GenericValue scheme)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubvertedPermissionManager

public SubvertedPermissionManager()
Method Detail

addPermission

public void addPermission(int permType,
                          org.ofbiz.core.entity.GenericValue scheme,
                          java.lang.String group)
                   throws CreateException
Description copied from interface: PermissionManager
Add a permission for a particular project and group

Specified by:
addPermission in interface PermissionManager
CreateException

addPermission

public void addPermission(JiraPermission perm)
                   throws CreateException
Description copied from interface: PermissionManager
Add a permission using a JiraPermission object

Specified by:
addPermission in interface PermissionManager
CreateException

removePermission

public boolean removePermission(JiraPermission perm)
                         throws RemoveException
Description copied from interface: PermissionManager
Remove a permission

Specified by:
removePermission in interface PermissionManager
Returns:
True if the permission was removed, false if not (usually it didn't exist)
RemoveException

removePermission

public boolean removePermission(int permType,
                                org.ofbiz.core.entity.GenericValue scheme,
                                java.lang.String group)
                         throws RemoveException
Description copied from interface: PermissionManager
Remove a permission from a group in a particular scheme

Specified by:
removePermission in interface PermissionManager
Returns:
True if the permission was removed, false if not (usually it didn't exist)
RemoveException

getGlobalPermissions

public java.util.Collection getGlobalPermissions(int permType)
Specified by:
getGlobalPermissions in interface PermissionManager

getPermissions

public java.util.Collection getPermissions(int permType,
                                           org.ofbiz.core.entity.GenericValue entity)
Specified by:
getPermissions in interface PermissionManager

getProjects

public java.util.Collection getProjects(int permType,
                                        com.opensymphony.module.user.User user)
                                 throws java.lang.Exception
Description copied from interface: PermissionManager
Get a collection of projects which a user can see (for a given permission)

Specified by:
getProjects in interface PermissionManager
java.lang.Exception

getProjects

public java.util.Collection getProjects(int permType,
                                        java.util.Collection groups)
                                 throws java.lang.Exception
Specified by:
getProjects in interface PermissionManager
java.lang.Exception

hasProjects

public boolean hasProjects(int permType,
                           com.opensymphony.module.user.User user)
                    throws java.lang.Exception
Description copied from interface: PermissionManager
Return true if there are any projects which match the given permission and user

Specified by:
hasProjects in interface PermissionManager
java.lang.Exception

hasProjects

public boolean hasProjects(int permType,
                           java.util.Collection groups)
                    throws java.lang.Exception
Specified by:
hasProjects in interface PermissionManager
java.lang.Exception

removeSchemePermissions

public void removeSchemePermissions(org.ofbiz.core.entity.GenericValue scheme)
                             throws RemoveException
Specified by:
removeSchemePermissions in interface PermissionManager
RemoveException

removeGroupPermissions

public void removeGroupPermissions(java.lang.String group)
                            throws RemoveException
Specified by:
removeGroupPermissions in interface PermissionManager
RemoveException

getGroups

public java.util.Collection getGroups(int permType)
                               throws java.lang.Exception
Description copied from interface: PermissionManager
Get a set of groups with this global permission type

Specified by:
getGroups in interface PermissionManager
java.lang.Exception

getProjectGroups

public java.util.Collection getProjectGroups(int permType,
                                             org.ofbiz.core.entity.GenericValue entity)
                                      throws java.lang.Exception
Description copied from interface: PermissionManager
Get a set of groups with this permission type and project

Specified by:
getProjectGroups in interface PermissionManager
java.lang.Exception

getAllGroups

public java.util.Collection getAllGroups(int permType,
                                         org.ofbiz.core.entity.GenericValue entity)
                                  throws java.lang.Exception
Description copied from interface: PermissionManager
Get all groups that have this permission type, in this project and globally

Specified by:
getAllGroups in interface PermissionManager
java.lang.Exception

hasPermission

public boolean hasPermission(JiraPermission perm)
Specified by:
hasPermission in interface PermissionManager

hasPermission

public boolean hasPermission(int permType,
                             org.ofbiz.core.entity.GenericValue project,
                             java.lang.String group)
Specified by:
hasPermission in interface PermissionManager

hasUserPermission

public boolean hasUserPermission(int permType,
                                 org.ofbiz.core.entity.GenericValue project,
                                 com.opensymphony.module.user.User user)
Specified by:
hasUserPermission in interface PermissionManager

hasGroupsPermission

public boolean hasGroupsPermission(int permType,
                                   org.ofbiz.core.entity.GenericValue entity,
                                   java.util.Collection groups)
Specified by:
hasGroupsPermission in interface PermissionManager

getUsersWithPermission

public java.util.Collection getUsersWithPermission(int permType,
                                                   org.ofbiz.core.entity.GenericValue entity)
                                            throws java.lang.Exception
Specified by:
getUsersWithPermission in interface PermissionManager
java.lang.Exception


Copyright © 2002-2003 Atlassian. All Rights Reserved.