public class ProjectsWhereUserHasPermissionFunction extends AbstractUserCapabilityFunction
This function expects zero or one argument. If zero arguments are supplied the current logged in user will be used as component lead.
Modifier and Type | Field and Description |
---|---|
static String |
FUNCTION_PROJECTS_WHERE_USER_HAS_PERMISSION |
userUtil
Constructor and Description |
---|
ProjectsWhereUserHasPermissionFunction(PermissionManager permissionManager,
UserUtil userUtil,
I18nHelper.BeanFactory i18nHelperFactory) |
Modifier and Type | Method and Description |
---|---|
JiraDataType |
getDataType()
Provides the
JiraDataType that this function handles and creates values for. |
protected List<QueryLiteral> |
getFunctionValuesList(QueryCreationContext queryCreationContext,
FunctionOperand functionOperand,
ApplicationUser user,
String permissionName)
Get the function return values based on the actual user and capability.
|
protected String |
getUserNotFoundMessageKey()
Get the I18n message key for the error when the passed in user does not exist.
|
protected MessageSet |
validateCapability(String permissionName,
I18nHelper i18n)
Check the capability requested.
|
getMinimumNumberOfExpectedArguments, getValues, validate
getFunctionName, getI18n, getModuleDescriptor, init, isList, validateNumberOfArgs
public static final String FUNCTION_PROJECTS_WHERE_USER_HAS_PERMISSION
public ProjectsWhereUserHasPermissionFunction(PermissionManager permissionManager, UserUtil userUtil, I18nHelper.BeanFactory i18nHelperFactory)
public JiraDataType getDataType()
JqlFunction
JiraDataType
that this function handles and creates values for. This
allows us to infer some information about how it will interact with other elements in the system.
For example, if this returns JiraDataTypes.DATE
then we know that we can provide
values for any clauses that also specify a data type of DATE.
JiraDataTypes
protected MessageSet validateCapability(String permissionName, I18nHelper i18n)
AbstractUserCapabilityFunction
validateCapability
in class AbstractUserCapabilityFunction
permissionName
- The name of the capability being checked. This will be the name of something like a permission
or rolei18n
- I18HelperMessageSet
which must not be null, but may be empty when there are no
errors.protected List<QueryLiteral> getFunctionValuesList(QueryCreationContext queryCreationContext, FunctionOperand functionOperand, ApplicationUser user, String permissionName)
AbstractUserCapabilityFunction
getFunctionValuesList
in class AbstractUserCapabilityFunction
queryCreationContext
- the context of query creationfunctionOperand
- the operand to get values fromuser
- the user. This value may be the searcher or a user the searcher is enquiring on behalf of.
If the 2nd parameter (a User) of the function is supplied then the capability of
that user is quueried.
The functionality to run this for a user other than the logged in user has been removed
until decisions can be made regarding http://jira.atlassian.com/browse/JRA-21476permissionName
- the capability being requestedprotected String getUserNotFoundMessageKey()
AbstractUserCapabilityFunction
getUserNotFoundMessageKey
in class AbstractUserCapabilityFunction
Copyright © 2002-2024 Atlassian. All Rights Reserved.