Let admins limit Approval Path permission schemes to selected spaces
Description
Problem
"Enable Work item page Jira Permission Scheme" and "Enable Space Permission Scheme" in Settings > Permissions apply to the whole site. Once enabled, every space takes its Approval Path permissions from its permission scheme. Jira grants these permissions to no one except the app itself, so in every new space the panel, the approval actions, the space's Approval Path page and definition management are blocked for users, space admins included, until an admin grants them. This hits team-managed spaces and spaces with their own scheme hardest, because each one has to be configured separately. An admin who wants restrictions in only a few spaces has to maintain grants in all of them.
Change
-
Under "Enable Work item page Jira Permission Scheme" and under "Enable Space Permission Scheme" the admin picks a scope: "All spaces" or "Selected spaces" with a list of spaces, separately for each toggle.
-
"All spaces" works as today and is the default.
-
With "Selected spaces", permissions from the permission scheme apply only in the selected spaces. In other spaces Approval Path works as with the toggle off.
-
New spaces are not added to the list automatically, so with "Selected spaces" they work without any configuration.
-
The work item scope covers the Approval Path panel, the details and Activity views, "Export approvals to PDF", the request view in the JSM portal and the approval actions (start, parametrize, notify, delete, archive).
-
The space scope covers the space's Approval Path page and adding, editing and deleting definitions.
-
Applies to company-managed and team-managed spaces.
Acceptance criteria
-
On an existing installation with the toggles on, the scope is "All spaces" and behavior does not change in any space.
-
With "Selected spaces" for work items, a user without the "View approval path on work item page" permission does not see the Approval Path panel on a work item in a selected space, and in a space outside the list sees the panel and can perform all actions.
-
With "Selected spaces", actions without a granted permission (start, delete, archive, notify, parametrize) are rejected only in the selected spaces, including the JSM portal and bulk actions.
-
With "Selected spaces" for spaces, a space admin of a space outside the list opens the space's Approval Path page and manages definitions without grants in the permission scheme, and in a selected space needs the permissions from the scheme.
-
A space created after the settings are saved works as with the toggles off until an admin adds it to the list.
-
Only a user with access to Settings > Permissions can change the scope and the list of spaces.
-
Removing a space from the list restores the toggle-off behavior in that space.