Don't show 'Save for Review' button if refs/meta/config is not visible
When editing the access rights of a project users can save the modifications for review, which creates a change for the refs/meta/config branch that contains the modifications. Creating the change is only possible if the refs/meta/config branch is visible and the user has permissions to upload a change to this branch or is project owner. At the moment the 'Save for Review' is always shown for project owners. However it is possible to setup access rights in such a way that project owners can't see the refs/meta/config branch. In this case trying to save access rights modifications for review fails. This is similar to the issue that has been fixed in change Id52ec9. Change-Id: I61cf091882b846101b2f83540b6806d1fd376588 Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
parent
9023196e86
commit
13634e36ad
@ -206,8 +206,8 @@ class ProjectAccessFactory extends Handler<ProjectAccess> {
|
||||
|
||||
detail.setLocal(local);
|
||||
detail.setOwnerOf(ownerOf);
|
||||
detail.setCanUpload(pc.isOwner()
|
||||
|| (metaConfigControl.isVisible() && metaConfigControl.canUpload()));
|
||||
detail.setCanUpload(metaConfigControl.isVisible()
|
||||
&& (pc.isOwner() || metaConfigControl.canUpload()));
|
||||
detail.setConfigVisible(pc.isOwner() || metaConfigControl.isVisible());
|
||||
detail.setGroupInfo(buildGroupInfo(local));
|
||||
detail.setLabelTypes(pc.getLabelTypes());
|
||||
|
Loading…
Reference in New Issue
Block a user