summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdwin Kempin <edwin.kempin@sap.com>2012-11-13 15:08:14 +0100
committerEdwin Kempin <edwin.kempin@sap.com>2012-12-12 09:05:24 +0100
commit63666d58c4cd3a8e133aadf6c980d3c7cc2c836f (patch)
tree7ebd7adb69ecfae29bb380ff2d7b6eede542ad15
parentf7222cbed98deee86d848bed0be4db70b5bd254e (diff)
Allow assigning Push for refs/meta/config on All-Projects
The refs/meta/config branch of the All-Projects project should only be modified by Gerrit administrators because being able to do modifications on this branch means that the user could assign himself administrator permissions. In addition to being administrator we already require that the administrator has the Push access right for refs/meta/config in order to be able to modify it (just as with all other branches administrators do not have edit permissions by default). The problem was that assigning the Push access right for refs/meta/config on the All-Projects project was not allowed. Having the Push access right for refs/meta/config on the All-Projects project without being administrator already has no effect. Prohibiting to assign the Push access right for refs/meta/config on the All-Project project was anyway pointless since it was e.g. possible to assign the Push access right on refs/meta/*. Change-Id: I0640c5b3a479b31120d28c1af0c3112ccbbd555e Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
-rw-r--r--gerrit-common/src/main/java/com/google/gerrit/common/data/Permission.java3
1 files changed, 0 insertions, 3 deletions
diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/Permission.java b/gerrit-common/src/main/java/com/google/gerrit/common/data/Permission.java
index 5cb7787505..fd408887cf 100644
--- a/gerrit-common/src/main/java/com/google/gerrit/common/data/Permission.java
+++ b/gerrit-common/src/main/java/com/google/gerrit/common/data/Permission.java
@@ -80,9 +80,6 @@ public class Permission implements Comparable<Permission> {
if (AccessSection.ALL.equals(ref)) {
return !OWNER.equals(permissionName);
}
- if (AccessSection.REF_CONFIG.equals(ref)) {
- return !PUSH.equals(permissionName);
- }
return true;
}