|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.security.type.AbstractSecurityType com.atlassian.jira.security.type.AbstractIssueFieldSecurityType
public abstract class AbstractIssueFieldSecurityType
Constructor Summary | |
---|---|
AbstractIssueFieldSecurityType()
|
Method Summary | |
---|---|
protected abstract String |
getFieldName(String parameter)
Get the field name for this Issue Field-based Security Type given the parameter in the saved configuration. |
org.apache.lucene.search.Query |
getQuery(com.atlassian.crowd.embedded.api.User searcher,
Project project,
IssueSecurityLevel securityLevel,
String parameter)
Returns a query based on security level and the project passed in. |
org.apache.lucene.search.Query |
getQuery(com.atlassian.crowd.embedded.api.User searcher,
Project project,
String parameter)
|
protected org.apache.lucene.search.BooleanQuery |
getQueryForProject(Project project,
com.atlassian.crowd.embedded.api.User searcher,
String fieldName)
Gets called to produce the Lucene query for a project |
protected org.apache.lucene.search.BooleanQuery |
getQueryForSecurityLevel(IssueSecurityLevel issueSecurity,
com.atlassian.crowd.embedded.api.User searcher,
String fieldName)
Produces a Lucene query for a given issue security type such that documents match the query only when the given user is defined for the issue by this custom field in the given security. |
Set<com.atlassian.crowd.embedded.api.User> |
getUsers(PermissionContext ctx,
String argument)
Returns a list of User s represented by a security type instance. |
protected abstract boolean |
hasIssuePermission(com.atlassian.crowd.embedded.api.User user,
boolean issueCreation,
org.ofbiz.core.entity.GenericValue issueGv,
String argument)
|
protected abstract boolean |
hasIssuePermission(com.atlassian.crowd.embedded.api.User user,
boolean issueCreation,
Issue issue,
String parameter)
|
boolean |
hasPermission(org.ofbiz.core.entity.GenericValue entity,
String argument)
Interface for determining if a permission type has the permission. |
boolean |
hasPermission(org.ofbiz.core.entity.GenericValue entity,
String argument,
com.atlassian.crowd.embedded.api.User user,
boolean issueCreation)
Decides if the given User has permission to see the given issue or project. |
boolean |
hasPermission(Issue issue,
String argument)
Determines if this permission type is satisfied for anonymous access. |
boolean |
hasPermission(Issue issue,
String parameter,
com.atlassian.crowd.embedded.api.User user,
boolean issueCreation)
Determines if this permission type is satisfied. |
boolean |
hasPermission(Project project,
String argument)
Determines if this permission type is satisfied for anonymous access. |
boolean |
hasPermission(Project project,
String parameter,
com.atlassian.crowd.embedded.api.User user,
boolean issueCreation)
Determines if this permission type is satisfied. |
protected abstract boolean |
hasProjectPermission(com.atlassian.crowd.embedded.api.User user,
boolean issueCreation,
org.ofbiz.core.entity.GenericValue project)
|
protected abstract boolean |
hasProjectPermission(com.atlassian.crowd.embedded.api.User user,
boolean issueCreation,
Project project)
|
Methods inherited from class com.atlassian.jira.security.type.AbstractSecurityType |
---|
getArgumentDisplay, isValidForPermission |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.atlassian.jira.scheme.SchemeType |
---|
doValidation, getDisplayName, getType |
Constructor Detail |
---|
public AbstractIssueFieldSecurityType()
Method Detail |
---|
protected abstract String getFieldName(String parameter)
Some Field based permissions are based on hard-coded fields like assignee and reporter in which case the parameter is not used. Other types use the parameter to name the particular User or Group custom field that is used for the permission.
parameter
- the parameter as saved in the config
public org.apache.lucene.search.Query getQuery(com.atlassian.crowd.embedded.api.User searcher, Project project, String parameter)
public org.apache.lucene.search.Query getQuery(com.atlassian.crowd.embedded.api.User searcher, Project project, IssueSecurityLevel securityLevel, String parameter)
SecurityType
searcher
- The searcher conducting the searchproject
- The project for which we're constructing a querysecurityLevel
- The security level for which we are constructing the queryparameter
- Parameter identifying user related field (reporter, assignee, etc)
protected org.apache.lucene.search.BooleanQuery getQueryForProject(Project project, com.atlassian.crowd.embedded.api.User searcher, String fieldName)
project
- The project for which to construct a querysearcher
- The user who is searching to add to the query
protected org.apache.lucene.search.BooleanQuery getQueryForSecurityLevel(IssueSecurityLevel issueSecurity, com.atlassian.crowd.embedded.api.User searcher, String fieldName)
issueSecurity
- the security defined by this IssueFieldSecurityType instance.searcher
- the user.
public boolean hasPermission(org.ofbiz.core.entity.GenericValue entity, String argument)
SchemeType
entity
- This is the issue or the project that the security is being checked forargument
- If this particular SchemeType has been configured with a parameter, then this parameter is passed (eg. Group Name for GroupDropdown
)
public boolean hasPermission(Issue issue, String argument)
SchemeType
issue
- This is the issue that the security is being checked forargument
- If this particular SchemeType has been configured with a parameter, then this parameter is passed (eg. Group Name for GroupDropdown
)
public boolean hasPermission(Project project, String argument)
SchemeType
project
- This is the project that the security is being checked forargument
- If this particular SchemeType has been configured with a parameter, then this parameter is passed (eg. Group Name for GroupDropdown
)
public boolean hasPermission(org.ofbiz.core.entity.GenericValue entity, String argument, com.atlassian.crowd.embedded.api.User user, boolean issueCreation)
entity
- The Generic Value. Shoule be an Issueargument
- Not needed for this implementationuser
- User to check the permission on. If it is null then the check is made on the current userissueCreation
- NFI
hasPermission(org.ofbiz.core.entity.GenericValue, java.lang.String)
,
ProjectLead.hasPermission(org.ofbiz.core.entity.GenericValue, java.lang.String)
,
SingleUser.hasPermission(org.ofbiz.core.entity.GenericValue, java.lang.String)
,
GroupDropdown.hasPermission(org.ofbiz.core.entity.GenericValue, java.lang.String)
public boolean hasPermission(Issue issue, String parameter, com.atlassian.crowd.embedded.api.User user, boolean issueCreation)
SchemeType
issue
- This is the issue that the security is being checked forparameter
- If this particular SchemeType has been configured with a parameter, then this parameter is passed (eg. Group Name for GroupDropdown
)user
- The user for whom the permission is being checkedissueCreation
- Whether this permission is being checked during issue creation
public boolean hasPermission(Project project, String parameter, com.atlassian.crowd.embedded.api.User user, boolean issueCreation)
SchemeType
project
- This is the project that the security is being checked forparameter
- If this particular SchemeType has been configured with a parameter, then this parameter is passed (eg. Group Name for GroupDropdown
)user
- The user for whom the permission is being checkedissueCreation
- Whether this permission is being checked during issue creation
protected abstract boolean hasIssuePermission(com.atlassian.crowd.embedded.api.User user, boolean issueCreation, org.ofbiz.core.entity.GenericValue issueGv, String argument)
protected abstract boolean hasIssuePermission(com.atlassian.crowd.embedded.api.User user, boolean issueCreation, Issue issue, String parameter)
protected abstract boolean hasProjectPermission(com.atlassian.crowd.embedded.api.User user, boolean issueCreation, org.ofbiz.core.entity.GenericValue project)
protected abstract boolean hasProjectPermission(com.atlassian.crowd.embedded.api.User user, boolean issueCreation, Project project)
public Set<com.atlassian.crowd.embedded.api.User> getUsers(PermissionContext ctx, String argument)
SecurityType
User
s represented by a security type instance. The collection must
not contain any nulls.
ctx
- The current issue and projectargument
- Instance value, eg. a group name, user name, custom field id
User
s.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |