Cancel ProjectPermissionModificationRequestedEvent and display custom message in UI

Nikhil Tyagi March 15, 2019

We have custom plugin which listens on pre-events such as "ProjectPermissionGrantRequestedEvent". Now if we want to cancel this event we do something like

 

pushEvent.cancel(i18nService.createKeyedMessage("customplugin.cancel"));

where customplugin.cancel =" Custom error "

 

In bitbucket, we can't see the custom error message whereas when we see the developer console,

For the api - PUT /projects/PROJECT_1/permissions/groups?permission=PROJECT_ADMIN&name=stash-users

The response was -

{"errors":[

{"context":null,"message":"Permission modification canceled","exceptionName":"com.atlassian.bitbucket.permission.PermissionModificationCanceledException","details":["Custom error"]}

]}

In the response,

1. The "message" is the bitbucket generic message but
2. If you see the "details", my custom error is registered but i'm not sure how to display it in the UI.

 

Please help.

1 answer

0 votes
Nikhil Tyagi March 19, 2019

Atlassian raised a bug for this  - https://jira.atlassian.com/browse/BSERV-11657

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events