Log inSkip to main contentSkip to sidebar
IMPORTANT: JAC is a Public system and anyone on the internet will be able to view the data in the created JAC tickets. Please don’t include Customer or Sensitive data in the JAC ticket.
Performing multiple API calls to permissions-config to modify group permissions causes excess email notifications
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
Have 3 users
Create 3 groups: admin, write, defaultgroup (a default group)
Assign 1 user to each group
Create 2 repo's
Perform multiple simultaneous PUT calls per repo (see internal comment) to grant group access to each of these groups
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.