Prevent deletion (and creation) of refs/meta/group-names
This branch guarantees unique group names for groups in NoteDb. It must not be possible to delete it. Change-Id: Iceaa1820c81e58914c7fdaa6b22592161a07875f Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
@@ -149,7 +149,8 @@ public class RefOperationValidators {
|
||||
}
|
||||
}
|
||||
|
||||
if (refEvent.command.getRefName().startsWith(RefNames.REFS_GROUPS)) {
|
||||
if (refEvent.command.getRefName().startsWith(RefNames.REFS_GROUPS)
|
||||
|| refEvent.command.getRefName().equals(RefNames.REFS_GROUPNAMES)) {
|
||||
if (refEvent.command.getType().equals(ReceiveCommand.Type.CREATE)) {
|
||||
throw new ValidationException("Not allowed to create group branch.");
|
||||
} else if (refEvent.command.getType().equals(ReceiveCommand.Type.DELETE)) {
|
||||
|
||||
Reference in New Issue
Block a user