Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,368,495
Community Members
 
Community Events
168
Community Groups

Bitbucket detecting permission change with ScripRunner

Hi all,

I'm a totally newbie in the use of ScriptRunner and Groovy. Here is what I need to do: detect any modification (add, modify, delete) in the permissions for any project, and send a mail to a specific address when a modification is detected, including :

  • project key,
  • current user name (the one who makes the modification),
  • new permission (if any),
  • old permission (if any),
  • affected user name

 

I'm quite sure this is possible using kind of ProjectPermissionModifiedEvent event but I'm not able to define the needed script(s) by myself.

 

Any help is welcome

1 answer

1 accepted

Hi Bertrand

Yes, 'ProjectPermissionModifiedEvent' is the correct event type.

We have updated our documentation page with an example for project permission modifications :

https://docs.adaptavist.com/sr4bib/latest/features/listeners/built-in-listeners/send-custom-email-on-event

You can access the event info you need as :

  • Affected user name : event.affectedUser.displayName
  • User who changed the permission : event.user.displayName
  • Project key : event.project.key
  • Previous project permission : event.oldValue
  • New project permission : event.newValue

Please let us know if you'd like further help!

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events