Class PermissionSchemeUtil

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

public final class PermissionSchemeUtil extends Object
  • Method Details

    • getPermissionKey

      public static io.atlassian.fugue.Option<ProjectPermissionKey> getPermissionKey(SchemeEntity schemeEntity)
      Retrieves a permission key from a scheme entity's entityTypeId field.

      As SchemeEntity's entityTypeId field is of type Object there can be a lot of different things there. We accept and are able to process the following classes:

      Option.none() is returned if entityTypeId if we couldn't find a legacy mapping from numeric value.

      Returns:
      some project permission key if successful, none() otherwise
      Throws:
      IllegalArgumentException - when entityTypeId field is not a valid class.