Closed tofi86 closed 5 years ago
Good point! Coupling this to :browse_repository
is probably good enough for now. Can you add a functional test that covers the case when the merge request box is not visible? Also the branch needs a rebase now that I merged the localization changes.
I rebased the branch on your current master
.
However, I won't have time these days to add the test for it. Any chance you can take a look?
Awesome, thanks!
Use redmine built-in
:browse_repository
permissions to view the MergeRequest box. This hides the box from external users who are not allowed to view the "repositories" tab in the project.However, this is kind of a hacky solution for permission handling. There's better ways, see for example https://github.com/paginagmbh/redmine_silencer/blob/master/init.rb#L12 to add a new permission for Roles.