Revert migration from refs/for/* permissions to refs/heads/*
The migration contains a bug which causes project.config to become unreadable, breaking a site until it is fixed. A fix is in progress[1], but there are still some open questions that we don't have answers to. Revert the functionality for now, to give us time to fully bake a fix. This reverts the following commits:9ff07177ea
8392e982c0
66c52dae95
642f3e07e7
[1] https://gerrit-review.googlesource.com/c/gerrit/+/173513 Change-Id: I139ba7aa97a946f2c31258e7dfaa3a94ee72ff6e
This commit is contained in:
@@ -58,7 +58,7 @@ limitations under the License.
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 36px;
|
||||
width: 9em;
|
||||
width: 7em;
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
|
@@ -16,7 +16,6 @@ package com.google.gerrit.client.admin;
|
||||
|
||||
import static com.google.gerrit.common.data.Permission.EDIT_TOPIC_NAME;
|
||||
import static com.google.gerrit.common.data.Permission.PUSH;
|
||||
import static com.google.gerrit.common.data.Permission.SUBMIT;
|
||||
|
||||
import com.google.gerrit.client.Dispatcher;
|
||||
import com.google.gerrit.client.Gerrit;
|
||||
@@ -140,23 +139,15 @@ public class PermissionRuleEditor extends Composite
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
|
||||
String name = permission.getName();
|
||||
boolean canForce = true;
|
||||
switch (name) {
|
||||
case SUBMIT:
|
||||
force.setText(PermissionRule.FORCE_SUBMIT);
|
||||
break;
|
||||
case EDIT_TOPIC_NAME:
|
||||
force.setText(PermissionRule.FORCE_EDIT);
|
||||
break;
|
||||
case PUSH:
|
||||
force.setText(PermissionRule.FORCE_PUSH);
|
||||
String ref = section.getName();
|
||||
canForce = !ref.startsWith("refs/for/") && !ref.startsWith("^refs/for/");
|
||||
break;
|
||||
default:
|
||||
canForce = false;
|
||||
boolean canForce = PUSH.equals(name);
|
||||
if (canForce) {
|
||||
String ref = section.getName();
|
||||
canForce = !ref.startsWith("refs/for/") && !ref.startsWith("^refs/for/");
|
||||
force.setText(PermissionRule.FORCE_PUSH);
|
||||
} else {
|
||||
canForce = EDIT_TOPIC_NAME.equals(name);
|
||||
force.setText(PermissionRule.FORCE_EDIT);
|
||||
}
|
||||
|
||||
force.setVisible(canForce);
|
||||
force.setEnabled(!readOnly);
|
||||
action.getElement().setPropertyBoolean("disabled", readOnly);
|
||||
|
@@ -55,7 +55,7 @@ limitations under the License.
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 36px;
|
||||
width: 9em;
|
||||
width: 7em;
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user