Package com.atlassian.jira.security.type
Class UserCF
java.lang.Object
com.atlassian.jira.security.type.AbstractSecurityType
com.atlassian.jira.security.type.AbstractIssueFieldSecurityType
com.atlassian.jira.security.type.UserCF
- All Implemented Interfaces:
SchemeType,SecurityType
Issue Security and Permission type for a User Selector custom field,
or select-list custom fields which specify users.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUserCF(JiraAuthenticationContext jiraAuthenticationContext, CustomFieldManager customFieldManager) -
Method Summary
Modifier and TypeMethodDescriptionvoiddoValidation(String key, Map<String, String> parameters, JiraServiceContext jiraServiceContext) getArgumentDisplay(String argument) protected StringgetFieldName(String parameter) Get the field name for this Issue Field-based Security Type given the parameter in the saved configuration.getType()getUsers(PermissionContext ctx, String customFieldId) Get user specified by the Custom Fieldprotected booleanhasIssuePermission(ApplicationUser user, boolean issueCreation, Issue issue, String parameter) protected booleanhasProjectPermission(ApplicationUser user, boolean issueCreation, Project project) Methods inherited from class com.atlassian.jira.security.type.AbstractIssueFieldSecurityType
getPermissionFieldContents, getPermissionFieldContents, getPermissionFieldContentsForProject, getPermissionFieldContentsForSecurityLevel, hasPermission, hasPermission, hasPermission, hasPermission, isTopLevelIssueSecurityPermission, isTopLevelProjectPermissionMethods inherited from class com.atlassian.jira.security.type.AbstractSecurityType
isValidForPermissionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.jira.security.type.SecurityType
getUsers
-
Field Details
-
TYPE
- See Also:
-
-
Constructor Details
-
UserCF
public UserCF(JiraAuthenticationContext jiraAuthenticationContext, CustomFieldManager customFieldManager)
-
-
Method Details
-
getDisplayName
-
getType
-
doValidation
public void doValidation(String key, Map<String, String> parameters, JiraServiceContext jiraServiceContext) -
getFieldName
Description copied from class:AbstractIssueFieldSecurityTypeGet the field name for this Issue Field-based Security Type given the parameter in the saved configuration.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.
- Specified by:
getFieldNamein classAbstractIssueFieldSecurityType- Parameters:
parameter- the parameter as saved in the config- Returns:
- the field name for this Issue Field-based Security Type.
-
hasProjectPermission
protected boolean hasProjectPermission(ApplicationUser user, boolean issueCreation, Project project) - Specified by:
hasProjectPermissionin classAbstractIssueFieldSecurityType
-
hasIssuePermission
protected boolean hasIssuePermission(ApplicationUser user, boolean issueCreation, Issue issue, String parameter) - Specified by:
hasIssuePermissionin classAbstractIssueFieldSecurityType
-
getDisplayFields
-
getArgumentDisplay
- Specified by:
getArgumentDisplayin interfaceSecurityType- Overrides:
getArgumentDisplayin classAbstractSecurityType
-
getUsers
Get user specified by the Custom Field- Parameters:
ctx- permission contextcustomFieldId- eg. 'customfield_10000'- Returns:
- the set of users stored in the given custom field in the given context; an empty set is returned if the context could not provide values (i.e. there was no issue specified).
-