public class SingleUser extends AbstractProjectsSecurityType
Constructor and Description |
---|
SingleUser(JiraAuthenticationContext jiraAuthenticationContext,
UserManager userManager) |
Modifier and Type | Method and Description |
---|---|
boolean |
doValidation(String key,
Map<String,String> parameters)
Validates given input which in case of user is username
|
void |
doValidation(String key,
Map<String,String> parameters,
JiraServiceContext jiraServiceContext) |
String |
getArgumentDisplay(String argument) |
String |
getDisplayName()
Returns display name - i18ned admin.permission.types.single.user
|
String |
getType()
Always returns
DESC . |
Set<com.atlassian.crowd.embedded.api.User> |
getUsers(PermissionContext ctx,
String argument)
Returns a single element set that contains a
User object found
by the given user name. |
boolean |
hasPermission(org.ofbiz.core.entity.GenericValue entity,
String argument)
Always returns false;
|
boolean |
hasPermission(org.ofbiz.core.entity.GenericValue entity,
String argument,
com.atlassian.crowd.embedded.api.User user,
boolean issueCreation)
Determines if the single user is the same as the current user.
|
boolean |
hasPermission(Issue issue,
String parameter)
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.
|
getQuery, getQuery, getQuery
isValidForPermission
public static final String DESC
public SingleUser(JiraAuthenticationContext jiraAuthenticationContext, UserManager userManager)
public String getDisplayName()
public String getArgumentDisplay(String argument)
getArgumentDisplay
in interface SecurityType
getArgumentDisplay
in class AbstractSecurityType
public void doValidation(String key, Map<String,String> parameters, JiraServiceContext jiraServiceContext)
public boolean doValidation(String key, Map<String,String> parameters)
key
- parameters
- public boolean hasPermission(org.ofbiz.core.entity.GenericValue entity, String argument)
entity
- This parameter is ignoredargument
- This parameter is ignoredpublic 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(Issue issue, String parameter)
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
)public boolean hasPermission(org.ofbiz.core.entity.GenericValue entity, String argument, com.atlassian.crowd.embedded.api.User user, boolean issueCreation)
entity
- Not needed for this implementationargument
- The user key that the check is based onuser
- User to check the permission on. If it is null then the check is made on the current userissueCreation
- This parameter is ignoredAbstractIssueFieldSecurityType.hasPermission(org.ofbiz.core.entity.GenericValue, java.lang.String)
,
AbstractIssueFieldSecurityType.hasPermission(org.ofbiz.core.entity.GenericValue, java.lang.String)
,
ProjectLead.hasPermission(org.ofbiz.core.entity.GenericValue, java.lang.String)
,
GroupDropdown.hasPermission(org.ofbiz.core.entity.GenericValue, java.lang.String)
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 creationpublic 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 creationpublic Set<com.atlassian.crowd.embedded.api.User> getUsers(PermissionContext ctx, String argument)
User
object found
by the given user name.ctx
- permission contextargument
- user key stringCopyright © 2002-2015 Atlassian. All Rights Reserved.