|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.security.AbstractPermissionManager
An abstract PermissionManager that implements a lot of the common functionality to all PermissionManagers.
DefaultPermissionManager
Constructor Summary | |
AbstractPermissionManager()
|
Method Summary | |
void |
addPermission(int permissionsId,
org.ofbiz.core.entity.GenericValue scheme,
java.lang.String parameter,
java.lang.String securityType)
Adds a permission to the system |
java.util.Collection |
getAllGroups(int permissionId,
org.ofbiz.core.entity.GenericValue project)
Retrieve all groups that are used in the permission globally and in the project entity |
java.util.Collection |
getProjects(int permissionId,
com.opensymphony.user.User user)
Retrieve a list of projects this user has the permission for |
java.util.Collection |
getProjects(int permissionId,
com.opensymphony.user.User user,
org.ofbiz.core.entity.GenericValue category)
Retrieve a list of projects associated with the specified category, that this user has the permissions for |
boolean |
hasPermission(int permissionsId,
org.ofbiz.core.entity.GenericValue entity,
com.opensymphony.user.User u)
Checks to see if this has permission to see the specified entity Check Permissions scheme(s) if the entity is project Check Permissions scheme(s) and issue level security scheme(s) if the entity is an issue |
boolean |
hasPermission(int permissionsId,
org.ofbiz.core.entity.GenericValue entity,
com.opensymphony.user.User u,
boolean issueCreation)
|
boolean |
hasPermission(int permissionsId,
com.opensymphony.user.User u)
Checks to see if this user has the specified permission It will check only global permissions as there are no other permissions to check |
boolean |
hasProjects(int permissionId,
com.opensymphony.user.User user)
Can this user see atleast one project with this permission |
void |
removeGroupPermissions(java.lang.String group)
Remove all permissions that have used this group |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbstractPermissionManager()
Method Detail |
public void addPermission(int permissionsId, org.ofbiz.core.entity.GenericValue scheme, java.lang.String parameter, java.lang.String securityType) throws CreateException
addPermission
in interface PermissionManager
permissionsId
- Permissions valuescheme
- If null permission is global otherwise it is added to the schemeparameter
- Used for e.g. group namesecurityType
- e.g. GroupDropdown.DESC
CreateException
public boolean hasPermission(int permissionsId, com.opensymphony.user.User u)
hasPermission
in interface PermissionManager
permissionsId
- u
-
public boolean hasPermission(int permissionsId, org.ofbiz.core.entity.GenericValue entity, com.opensymphony.user.User u)
hasPermission
in interface PermissionManager
permissionsId
- , not a global permissionentity
- not null must be Project or Issueu
-
public boolean hasPermission(int permissionsId, org.ofbiz.core.entity.GenericValue entity, com.opensymphony.user.User u, boolean issueCreation)
hasPermission
in interface PermissionManager
public void removeGroupPermissions(java.lang.String group) throws RemoveException
removeGroupPermissions
in interface PermissionManager
group
- The name of the group that needs to be removed, must NOT be null and must be a real group
RemoveException
public boolean hasProjects(int permissionId, com.opensymphony.user.User user) throws java.lang.Exception
hasProjects
in interface PermissionManager
permissionId
- must NOT be a global permissionuser
-
java.lang.Exception
public java.util.Collection getProjects(int permissionId, com.opensymphony.user.User user) throws org.ofbiz.core.entity.GenericEntityException
getProjects
in interface PermissionManager
permissionId
- must NOT be a global permissionuser
-
org.ofbiz.core.entity.GenericEntityException
public java.util.Collection getProjects(int permissionId, com.opensymphony.user.User user, org.ofbiz.core.entity.GenericValue category) throws org.ofbiz.core.entity.GenericEntityException
PermissionManager
getProjects
in interface PermissionManager
permissionId
- user
- category
-
org.ofbiz.core.entity.GenericEntityException
public java.util.Collection getAllGroups(int permissionId, org.ofbiz.core.entity.GenericValue project) throws java.lang.Exception
getAllGroups
in interface PermissionManager
permissionId
- project
- project to retireve groups from
java.lang.Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |