Class PermissionHolder

java.lang.Object
com.atlassian.jira.permission.PermissionHolder

@Immutable @PublicApi public final class PermissionHolder extends Object
A person or a group of people that holds a permission.

When you grant a permission, you need to define to whom you grant it. PermissionHolder lets you do that.

It consists of two things:

PermissionHolderType type
Type of the permission holder. This can be e.g. user, group, project role but also more ephemeral things like issue assignee or reporter.

Standard JIRA reporter types are gathered in the JiraPermissionHolderType enum.

String parameter
Some types require a parameter (e.g. when the type is user, the parameter needs to contain the user id, group requires the group id, etc.) and some don't (e.g. assignee, reporter, project lead).

Note that each PermissionHolderType has a PermissionHolderType.requiresParameter() method, which specifies whether it requires a parameter or not. It is not possible to create a PermissionHolder without a parameter when the type requires one, and vice versa.