|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.security.AbstractPermissionManager com.atlassian.jira.mock.MockPermissionManager
public class MockPermissionManager
Constructor Summary | |
---|---|
MockPermissionManager()
|
|
MockPermissionManager(boolean defaultPermission)
Creates a PermissionManager implementation where, by default, all permissions are given or denied based on the given value. |
Method Summary | |
---|---|
boolean |
hasPermission(int permissionsId,
org.ofbiz.core.entity.GenericValue project,
com.atlassian.crowd.embedded.api.User user,
boolean issueCreation)
Does the same as PermissionManager.hasPermission(int,org.ofbiz.core.entity.GenericValue,User) except
the entity is a project GenericValue . |
boolean |
hasPermission(int permissionsId,
Project project,
com.atlassian.crowd.embedded.api.User u,
boolean issueCreation)
Checks whether the specified user has a specified permission within the context of a specified project. |
boolean |
hasPermission(int permissionsId,
com.atlassian.crowd.embedded.api.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 |
isDefaultPermission()
|
void |
removeGroupPermissions(String group)
Remove all permissions that have used this group |
void |
setDefaultPermission(boolean defaultPermission)
|
Methods inherited from class com.atlassian.jira.security.AbstractPermissionManager |
---|
addPermission, getAllGroups, getPermissionSchemeManager, getProjectManager, getProjectObjects, getProjects, getProjects, getProjects, getProjects, getProjects, hasPermission, hasPermission, hasPermission, hasPermission, hasPermission, hasPermission, hasPermission, hasProjectPermission, hasProjects, hasProjects, isGlobalPermission, removeUserPermissions, removeUserPermissions |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MockPermissionManager()
public MockPermissionManager(boolean defaultPermission)
defaultPermission
- if true, everything is permitted, if false, everything is denied.Method Detail |
---|
public boolean isDefaultPermission()
public void setDefaultPermission(boolean defaultPermission)
public void removeGroupPermissions(String group) throws RemoveException
AbstractPermissionManager
removeGroupPermissions
in interface PermissionManager
removeGroupPermissions
in class AbstractPermissionManager
group
- The name of the group that needs to be removed, must NOT be null and must be a real group
RemoveException
- if permission removal failspublic boolean hasPermission(int permissionsId, Project project, com.atlassian.crowd.embedded.api.User u, boolean issueCreation)
PermissionManager
hasPermission
in interface PermissionManager
hasPermission
in class AbstractPermissionManager
permissionsId
- A non-global permission, i.e. a permission that is granted via a project contextproject
- The project that is the context of the permission check.u
- The person to perform the permission check forissueCreation
- Whether this permission is being checked during issue creation
public boolean hasPermission(int permissionsId, org.ofbiz.core.entity.GenericValue project, com.atlassian.crowd.embedded.api.User user, boolean issueCreation)
PermissionManager
PermissionManager.hasPermission(int,org.ofbiz.core.entity.GenericValue,User)
except
the entity is a project GenericValue
.
hasPermission
in interface PermissionManager
hasPermission
in class AbstractPermissionManager
permissionsId
- Not a global permissionproject
- Not null.user
- User object, possibly null if JIRA is accessed anonymouslyissueCreation
- Whether this permission is being checked during issue creation
public boolean hasPermission(int permissionsId, com.atlassian.crowd.embedded.api.User u)
AbstractPermissionManager
hasPermission
in interface PermissionManager
hasPermission
in class AbstractPermissionManager
permissionsId
- permission idu
- user
GlobalPermissionManager.hasPermission(int, User)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |