Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Can "Edit in browser" be enabled per repository?

Florian Peschka January 26, 2017

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

4 votes
Answer accepted
Michael Heemskerk
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 26, 2017

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.

Florian Peschka January 26, 2017

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...

Michael Heemskerk
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 26, 2017

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.

Florian Peschka January 26, 2017

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

Florian Peschka January 27, 2017

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?

Michael Heemskerk
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 27, 2017

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.

 

Florian Peschka January 27, 2017

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

Sandy Motyl February 1, 2017

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...

Florian Peschka February 1, 2017

@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

Sandy Motyl February 2, 2017

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!

Thejeswara Reddy R December 9, 2018

Hi All,

 

Is there any option to disable the editable permissions in bitbucket web browser but it should works normal for all developers like., if developers push/pull code from console.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events