Package com.atlassian.jira.security.type
Class ProjectLead
java.lang.Object
com.atlassian.jira.security.type.AbstractSecurityType
com.atlassian.jira.security.type.AbstractProjectsSecurityType
com.atlassian.jira.security.type.ProjectLead
- All Implemented Interfaces:
SchemeType
,SecurityType
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
doValidation
(String key, Map parameters, JiraServiceContext jiraServiceContext) Set<org.apache.lucene.util.BytesRef>
getPermissionFieldContents
(ApplicationUser searcher, Project project, IssueSecurityLevel securityLevel, String parameter) Returns a set of (issue level permission field
) contents based on the security level, the project and optionally the parameter (for role-based queries).getType()
getUsers
(PermissionContext ctx, String ignored) Returns a set ofApplicationUser
s represented by a security type instance.boolean
hasPermission
(Issue issue, String parameter) Determines if this permission type is satisfied for anonymous access.boolean
hasPermission
(Issue issue, String parameter, ApplicationUser 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 argument, ApplicationUser user, boolean issueCreation) Determines if this permission type is satisfied.boolean
Returns true if this permission depends only on a issue security level value and not on project or any field value.Methods inherited from class com.atlassian.jira.security.type.AbstractProjectsSecurityType
getPermissionFieldContents, getPermissionFieldContents, isTopLevelProjectPermission
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.security.type.SecurityType
getUsers
-
Field Details
-
DESC
- See Also:
-
-
Constructor Details
-
ProjectLead
-
-
Method Details
-
getDisplayName
-
getType
-
hasPermission
Description copied from interface:SchemeType
Determines if this permission type is satisfied for anonymous access.- Parameters:
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 forGroupDropdown
)- Returns:
- true if anonymous Users have this permission.
-
hasPermission
Description copied from interface:SchemeType
Determines if this permission type is satisfied for anonymous access.- Parameters:
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 forGroupDropdown
)- Returns:
- true if anonymous Users have this permission.
-
hasPermission
public boolean hasPermission(Project project, String argument, ApplicationUser user, boolean issueCreation) Description copied from interface:SchemeType
Determines if this permission type is satisfied.- Parameters:
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 forGroupDropdown
)user
- The user for whom the permission is being checkedissueCreation
- Whether this permission is being checked during issue creation- Returns:
- true if the given User has this permission.
-
hasPermission
public boolean hasPermission(Issue issue, String parameter, ApplicationUser user, boolean issueCreation) Description copied from interface:SchemeType
Determines if this permission type is satisfied.- Parameters:
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 forGroupDropdown
)user
- The user for whom the permission is being checkedissueCreation
- Whether this permission is being checked during issue creation- Returns:
- true if the given User has this permission.
-
doValidation
-
getUsers
Description copied from interface:SecurityType
Returns a set ofApplicationUser
s represented by a security type instance. The collection must not contain any nulls.- Parameters:
ctx
- The current issue and projectignored
- Instance value, eg. a group name, user name, custom field id- Returns:
- A set of
ApplicationUser
s.
-
isTopLevelIssueSecurityPermission
public boolean isTopLevelIssueSecurityPermission()Description copied from interface:SecurityType
Returns true if this permission depends only on a issue security level value and not on project or any field value. Used for optimisation.- Specified by:
isTopLevelIssueSecurityPermission
in interfaceSecurityType
- Overrides:
isTopLevelIssueSecurityPermission
in classAbstractProjectsSecurityType
-
getPermissionFieldContents
public Set<org.apache.lucene.util.BytesRef> getPermissionFieldContents(ApplicationUser searcher, Project project, IssueSecurityLevel securityLevel, String parameter) Description copied from interface:SecurityType
Returns a set of (issue level permission field
) contents based on the security level, the project and optionally the parameter (for role-based queries). This is needed to build issue security level query.- Specified by:
getPermissionFieldContents
in interfaceSecurityType
- Overrides:
getPermissionFieldContents
in classAbstractProjectsSecurityType
- Parameters:
searcher
- The searcher conducting the searchproject
- The project for which we're constructing a querysecurityLevel
- The security level for which we are constructing the permissions field contentsparameter
- Parameter identifying user related field (reporter, assignee, etc)- Returns:
- A set of Lucene permissions field tuples
- See Also:
-