Performing multiple API calls to permissions-config to modify group permissions causes excess email notifications

XMLWordPrintable

    • 1
    • Severity 3 - Minor
    • 47

      Issue Summary

      • Every user with any access to a Bitbucket Cloud repository receives one "You have been granted access" notification email per PUT /2.0/repositories/{workspace}/{repo_slug}/permissions-config/groups/{group_slug} API call ** made on that repo, regardless of whether they are a member of the specific group being granted in that call.
      • Email count scales linearly with the number of PUT calls, not with the number of groups the recipient personally belongs to.

      Steps to Reproduce

      1. Have 3 users
      2. Create 3 groups: admin, write, defaultgroup (a default group)
      3. Assign 1 user to each group
      4. Create 2 repo's
      5. Perform multiple simultaneous PUT calls per repo (see internal comment) to grant group access to each of these groups
      6. Each person granted access receives 3 duplicate emails for each repo telling them they have been granted either read/write/admin access to the repo - they should only receive 1 per repo

      Expected Results

      • When a PUT API call is made, it should only inform the user once based on the group they're in

      Actual Results

      • The user is notified multiple times, regardless if the PUT API call targeted their group specifically

      Workaround

      • Use Project-level permissions instead of explicit per-repo API calls. If your groups are assigned at the Project level, new repositories created within that project will inherit those permissions automatically without triggering individual "granted access" emails for each group on each repo.

              Assignee:
              Unassigned
              Reporter:
              Ben
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: