Add the ability to restrict starting approvals to specific groups

Description

Requested by a customer: Possibility to define who can start approval (group).

Change

In a Jira approval definition, Availability → Groups allowed to start approvals lets definition managers choose up to 100 groups. A user must already have permission to start approvals and belong to at least one selected group. Leaving the selection empty allows anyone with the existing start permission. The group picker is disabled until the saved group names load.

Decisions

The restriction applies to user-initiated starts from a work item, the JSM portal and Rovo. The portal’s customer-start settings still apply. The app filters the list before pagination and checks current membership again when the user starts the approval. Rovo checks the starter’s groups with a fresh lookup when the approval is created, not from the cached list: if the allowed groups change between prepare and submit, the user gets "No approval was started: You do not belong to a group allowed to start this approval." Automated starts continue to use their existing rules. Existing definitions begin with an empty selection.

Fixes included

  • The manual definition picker on the JSM portal also checks whether customers may start the definition and whether it uses archived conditions.

  • The start endpoint checks portal access even when a customer reaches it with an older open page.

Manual tester notes

  1. On QA, edit a Jira definition that allows manual initiation. Under Availability, select two groups and save. Reopen the definition and check both names.

  2. On a work item, open Approval Path → New as a user with start permission who belongs to just one of the two groups. Find and start the approval. Repeat as a user outside both groups and check that the definition is absent.

  3. In the permission scheme, use a group member who lacks start permission. Confirm that group membership alone does not allow a start.

  4. Enable customer starts for the definition and repeat the member and nonmember checks in the JSM portal. Turn customer starts off and confirm the definition is absent from the portal’s start picker.

  5. Clear both groups, save, and check that the nonmember with ordinary start permission can start the definition. On a restricted definition, confirm that an existing automated start still runs.