Hello !
The problem is the following:
We have a listener in which we record various user actions and then save data, one of them is user comments on PullRequests.
The part of the code to enter here would be:
import com.atlassian.bitbucket.event.pull.PullRequestCommentEvent
if(event instanceof PullRequestCommentEvent){
def pr = event.getPullRequest()
def comment = event.getComment()
And the problem it is giving us is the following:
Event handler failed: event:
com.atlassian.bitbucket.event.pull.PullRequestCommentAddedEvent file: null
com.atlassian.bitbucket.AuthorisationException: You are not permitted to access this resource
The problem occurs randomly, the strange thing I see is that we are not importing those events that appear in the problem.
The same type of problem also appears with deleting comment and modifying it.
These problems also appear with events PullRequestParticipantStatusUpdatedEvent
Version of Bitbucket:7.21.7
Version of ScriptRunner 6.50