Package com.atlassian.jira.security.type
Class SingleUser
java.lang.Object
com.atlassian.jira.security.type.AbstractSecurityType
com.atlassian.jira.security.type.AbstractProjectsSecurityType
com.atlassian.jira.security.type.SingleUser
- All Implemented Interfaces:
SchemeType,SecurityType
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSingleUser(JiraAuthenticationContext jiraAuthenticationContext, UserManager userManager) -
Method Summary
Modifier and TypeMethodDescriptionvoiddoValidation(String key, Map<String, String> parameters, JiraServiceContext jiraServiceContext) getArgumentDisplay(String argument) Returns display name - i18ned admin.permission.types.single.usergetType()Always returnsDESC.getUsers(PermissionContext ctx, String argument) Returns a single element set that contains a User object found by the given user name.booleanhasPermission(Issue issue, String parameter) Determines if this permission type is satisfied for anonymous access.booleanhasPermission(Issue issue, String parameter, ApplicationUser user, boolean issueCreation) Determines if this permission type is satisfied.booleanhasPermission(Project project, String argument) Determines if this permission type is satisfied for anonymous access.booleanhasPermission(Project project, String parameter, ApplicationUser user, boolean issueCreation) Determines if this permission type is satisfied.Methods inherited from class com.atlassian.jira.security.type.AbstractProjectsSecurityType
getPermissionFieldContents, getPermissionFieldContentString, getPermissionFieldContentString, 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
-
DESC
- See Also:
-
-
Constructor Details
-
SingleUser
-
-
Method Details
-
getDisplayName
Returns display name - i18ned admin.permission.types.single.user- Returns:
- display name
-
getArgumentDisplay
- Specified by:
getArgumentDisplayin interfaceSecurityType- Overrides:
getArgumentDisplayin classAbstractSecurityType
-
getType
Always returnsDESC.- Returns:
- Always returns
DESC.
-
doValidation
public void doValidation(String key, Map<String, String> parameters, JiraServiceContext jiraServiceContext) -
hasPermission
Description copied from interface:SchemeTypeDetermines 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:SchemeTypeDetermines 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 parameter, ApplicationUser user, boolean issueCreation) Description copied from interface:SchemeTypeDetermines if this permission type is satisfied.- Parameters:
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 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:SchemeTypeDetermines 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.
-
getUsers
Returns a single element set that contains a User object found by the given user name.- Parameters:
ctx- permission contextargument- user key string- Returns:
- single element set
-