public class ApplicationRoleSecurityType extends AbstractProjectsSecurityType
Admins will be able to select licensed applications or 'Any'. Any simply requires that the user is logged in.
Constructor and Description |
---|
ApplicationRoleSecurityType(JiraAuthenticationContext jiraAuthenticationContext,
ApplicationAuthorizationService applicationAuthorizationService,
ApplicationRoleManager applicationRoleManager,
UserUtil userUtil) |
Modifier and Type | Method and Description |
---|---|
void |
doValidation(String key,
Map parameters,
JiraServiceContext jiraServiceContext) |
Set<ApplicationRole> |
getApplicationRoles() |
String |
getArgumentDisplay(String argument) |
String |
getDisplayName() |
String |
getType() |
Set<ApplicationUser> |
getUsers(PermissionContext ctx,
String applicationId)
Returns a list of
ApplicationUser 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 applicationRole)
Determines if this permission type is satisfied for anonymous access.
|
boolean |
hasPermission(Project project,
String parameter,
ApplicationUser user,
boolean issueCreation)
Determines if this permission type is satisfied.
|
getQuery, getQuery, getQuery
isValidForPermission
public static final String ID
public ApplicationRoleSecurityType(JiraAuthenticationContext jiraAuthenticationContext, ApplicationAuthorizationService applicationAuthorizationService, ApplicationRoleManager applicationRoleManager, UserUtil userUtil)
public String getDisplayName()
public String getArgumentDisplay(String argument)
getArgumentDisplay
in interface SecurityType
getArgumentDisplay
in class AbstractSecurityType
public String getType()
public boolean hasPermission(Project project, String applicationRole)
SchemeType
project
- This is the project that the security is being checked forapplicationRole
- 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(Project project, String parameter, ApplicationUser 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, ApplicationUser 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 void doValidation(String key, Map parameters, JiraServiceContext jiraServiceContext)
public Set<ApplicationRole> getApplicationRoles()
public Set<ApplicationUser> getUsers(PermissionContext ctx, String applicationId)
SecurityType
ApplicationUser
s represented by a security type instance. The collection must
not contain any nulls.ctx
- The current issue and projectapplicationId
- Instance value, eg. a group name, user name, custom field idApplicationUser
s.Copyright © 2002-2015 Atlassian. All Rights Reserved.