public class CurrentAssigneeHasAssignablePermission extends SimpleIssueFieldSecurityType
Constructor and Description |
---|
CurrentAssigneeHasAssignablePermission(JiraAuthenticationContext jiraAuthenticationContext) |
Modifier and Type | Method and Description |
---|---|
void |
doValidation(String key,
Map parameters,
JiraServiceContext jiraServiceContext) |
String |
getDisplayName() |
protected String |
getField() |
protected String |
getFieldName(String parameter)
Get the field name for this Issue Field-based Security Type given the parameter in the saved configuration.
|
protected String |
getFieldValue(Issue issue)
Returns the user key value for the given issue for the field that this security type checks.
|
String |
getType() |
Set<ApplicationUser> |
getUsers(PermissionContext ctx,
String ignored)
Returns a set of
ApplicationUser s represented by a security type instance. |
Set<ApplicationUser> |
getUsers(PermissionContext ctx,
String ignored,
String userSearchName,
int limit)
Returns a set of
ApplicationUser s represented by a security type instance
optionally filtered by given userSearchName. |
protected boolean |
hasProjectPermission(ApplicationUser user,
boolean issueCreation,
Project project) |
boolean |
isValidForPermission(ProjectPermissionKey permissionKey)
Is valid for all permissions except "Assignable".
|
hasIssuePermission
getPermissionFieldContents, getPermissionFieldContents, getPermissionFieldContentsForProject, getPermissionFieldContentsForSecurityLevel, hasPermission, hasPermission, hasPermission, hasPermission, isTopLevelIssueSecurityPermission, isTopLevelProjectPermission
getArgumentDisplay
public CurrentAssigneeHasAssignablePermission(JiraAuthenticationContext jiraAuthenticationContext)
public String getDisplayName()
public String getType()
public void doValidation(String key, Map parameters, JiraServiceContext jiraServiceContext)
protected String getFieldName(String parameter)
AbstractIssueFieldSecurityType
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.
getFieldName
in class AbstractIssueFieldSecurityType
parameter
- the parameter as saved in the configpublic boolean isValidForPermission(ProjectPermissionKey permissionKey)
Because we rely on the permissions for the "Assignable" function, then not only does it not make sense to add this role to "Assignable", it would actually cause an infinite loop. see JRA-13315
isValidForPermission
in interface SchemeType
isValidForPermission
in class AbstractSecurityType
permissionKey
- permission key.CurrentReporterHasCreatePermission
protected boolean hasProjectPermission(ApplicationUser user, boolean issueCreation, Project project)
hasProjectPermission
in class AbstractIssueFieldSecurityType
protected String getField()
getField
in class SimpleIssueFieldSecurityType
public Set<ApplicationUser> getUsers(@Nonnull PermissionContext ctx, @Nullable String ignored)
SecurityType
ApplicationUser
s represented by a security type instance. The collection must
not contain any nulls.ctx
- The current issue and projectignored
- Instance value, eg. a group name, user name, custom field idApplicationUser
s.@Nonnull public Set<ApplicationUser> getUsers(@Nonnull PermissionContext ctx, @Nullable String ignored, @Nonnull String userSearchName, int limit)
SecurityType
ApplicationUser
s represented by a security type instance
optionally filtered by given userSearchName.
The implementation must be as performant as possible and return users sorted by lowercase display name, then lowercase username.
The default implementation is provided only not to break existing implementations and should be avoided at all cost.
ctx
- the context this method is called in; contains issue and projectignored
- instance value, e.g. group name, username, custom field iduserSearchName
- query for user name; may be blanklimit
- maximum number of users to returnprotected String getFieldValue(Issue issue)
SimpleIssueFieldSecurityType
getFieldValue
in class SimpleIssueFieldSecurityType
issue
- the IssueCopyright © 2002-2024 Atlassian. All Rights Reserved.