Create "Revert" permission

Create a dedicated revert permission to only allow specific groups to
revert changes. Groups that don't have the "Revert" permission will not
see the Revert button and will not be allowed to revert changes from
the GUI.

This change is created due to spammers that easily use the "Revert
Submission" button to create many changes quickly.

Change-Id: If5180bc982659ab5c9ddaa096ac455823484c50c
This commit is contained in:
Gal Paikin
2020-01-22 10:36:35 +01:00
parent 037a4680f5
commit 6c9ed9550d
13 changed files with 99 additions and 18 deletions

View File

@@ -178,6 +178,7 @@ public class AllProjectsCreator {
grant(config, refsFor, Permission.ADD_PATCH_SET, registered);
grant(config, heads, codeReviewLabel, -1, 1, registered);
grant(config, heads, Permission.FORGE_AUTHOR, registered);
grant(config, heads, Permission.REVERT, registered);
grant(config, magic, Permission.PUSH, registered);
grant(config, magic, Permission.PUSH_MERGE, registered);
}

View File

@@ -75,6 +75,7 @@ public class AllProjectsCreatorTestUtil {
" push = group Project Owners",
" submit = group Administrators",
" submit = group Project Owners",
" revert = group Registered Users",
"[access \"refs/meta/config\"]",
" exclusiveGroupPermissions = read",
" create = group Administrators",