public interface

ManagedPermissionSchemeHelper

com.atlassian.jira.permission.management.ManagedPermissionSchemeHelper
Known Indirect Subclasses

Class Overview

A helper that can give out REST ready beans for permission scheme editing. Allows is to make rest requests AND pre-prime via data providers on the web page.

This is different to the official permission scheme REST API in that its shaped to help support the internal JIRA management screens, as opposed to the generic API. It has UI related data items that the public REST API has no use for

Summary

Public Methods
Either<ErrorCollectionProjectPermissionSchemeBean> addManagedPermissionSchemeGrants(ApplicationUser user, Long permissionSchemeId, PermissionsInputBean inputBean)
This allows a list of security types to be add to a list of permissions inside a permission scheme
Either<ErrorCollectionProjectPermissionSchemeBean> getManagedPermissionScheme(ApplicationUser user, Long permissionSchemeId)
Gets information that allows the manage permission scheme to be displayed
Either<ErrorCollectionProjectPermissionAddBean> getManagedPermissionSchemeAddView(ApplicationUser user, Long permissionSchemeId, String permissionKey)
Gets information that allows the add to permission scheme to be displayed
Either<ErrorCollectionProjectPermissionAddBean> getManagedPermissionSchemeAddViewSecurityTypes(ApplicationUser user)
Returns the security types split into primary and secondary types for display.
Either<ErrorCollectionProjectPermissionSchemeBean> removeManagedPermissionSchemeGrants(ApplicationUser user, Long permissionSchemeId, List<Long> grantsToDelete)
This allows a list of security types to be removed from a permission scheme

Public Methods

public Either<ErrorCollectionProjectPermissionSchemeBean> addManagedPermissionSchemeGrants (ApplicationUser user, Long permissionSchemeId, PermissionsInputBean inputBean)

This allows a list of security types to be add to a list of permissions inside a permission scheme

Parameters
user the user in play
permissionSchemeId the permission scheme to be deleted from
inputBean the grants things to add and to what permissions to add them to
Returns
  • either errors or the permission scheme in bean format

public Either<ErrorCollectionProjectPermissionSchemeBean> getManagedPermissionScheme (ApplicationUser user, Long permissionSchemeId)

Gets information that allows the manage permission scheme to be displayed

Parameters
user the user in play
permissionSchemeId the permission scheme to show
Returns
  • either errors or the permission scheme in bean format

public Either<ErrorCollectionProjectPermissionAddBean> getManagedPermissionSchemeAddView (ApplicationUser user, Long permissionSchemeId, String permissionKey)

Gets information that allows the add to permission scheme to be displayed

Parameters
user the user in play
permissionSchemeId the permission scheme to be added to
permissionKey the key to add to
Returns
  • either errors or the permission scheme in bean format

public Either<ErrorCollectionProjectPermissionAddBean> getManagedPermissionSchemeAddViewSecurityTypes (ApplicationUser user)

Returns the security types split into primary and secondary types for display.

Parameters
user the user in play
Returns
  • either errors or the security types in bean format

public Either<ErrorCollectionProjectPermissionSchemeBean> removeManagedPermissionSchemeGrants (ApplicationUser user, Long permissionSchemeId, List<Long> grantsToDelete)

This allows a list of security types to be removed from a permission scheme

Parameters
user the user in play
permissionSchemeId the permission scheme to be deleted from
grantsToDelete the security type grants to remove from the scheme
Returns
  • either errors or the permission scheme in bean format