Can "Edit in browser" be enabled per repository?

This question is in reference to Atlassian Documentation: Bitbucket Server 4.13 release notes

I would love to have this feature, but as we have some very hard restrictions on certain repos, I need to be able to enable the "edit" in browser feature on a per-repository basis, so I can control who and where this feature can be used. Is this possible?

1 answer

1 accepted

This widget could not be displayed.

Please note that 'edit in browser' will respect the permissions you have already set up for any repository. If you have restricted write access and/or set up branch permissions for the repository, these permissions will be respected.

Those permissions are not the problem. We have a custom plugin that checks commit messages against a legacy system (pre-receive). This must not be circumvented, so I'd like to just disable the "Edit in Browser" on those repositories so they are only modified through "real" (pushed) changes...

Plugins can also reject the proposed changes that the 'edit in browser' feature makes. You can do that by adding an event listener for the FileEditRequestedEvent, validating the provided commit message and calling event.cancel if the proposed change does not meet your plugin's requirements.

Ah, perfect. I'll look into it, thanks!

How do I get the commit message from the `FileEditRequestedEvent` (and the Event after the file was edited)? All I get is a branch, but not the message?

Hi Florian,

I checked the implementation and unfortunately, the required fields are not available on the event sad. I've raised https://jira.atlassian.com/browse/BSERV-9521  to fix that.

 

Thanks Michael. I was already doubting myself as to why I can't figure it out. I hope this can be resolved easily and fast because I'd really love to have this feature smile

We are working on an upgrade to 4.13.0 and will also be affected by the in-browser edit/commits not being validated by our commit checker plugin (YACC).  We depend on this for our Compliance mechanisms, so we can't update until we can either disable in-browser edits (in our case, ideally across all repos), or until the missing fields are added to the event and YACC is able to incorporate them.  Given the news of the missing fields, is there any thought being given to being able to disable the in-browser edit/commit feature?  Thanks...

@Sandy Motyl If you really want to disable the feature globally, I believe you can already do that with a property setting: https://answers.atlassian.com/questions/46800809

Thanks very much!  I briefly searched hoping that was available but didn't find it.  I appreciate you pointing it out.  That is what we will use until our commit checker can validate commits from the browser.  Thanks again!

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Friday in Bitbucket

What is your #1 piece of advice to new users getting started using Bitbucket?

Hello Community! My name is Claire Maynard, and I’m a Product Marketing Manager on the Bitbucket team. I’m interested in hearing what advice or tips you have for new users getting started on ...

232 views 14 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you