Package com.google.gerrit.server
Class CreateGroupPermissionSyncer
java.lang.Object
com.google.gerrit.server.CreateGroupPermissionSyncer
- All Implemented Interfaces:
ChangeMergedListener
With groups in NoteDb, the capability of creating a group is expressed as a
CREATE
permission on refs/groups/*
rather than a global capability in All-Projects
.
During the transition phase, we have to keep these permissions in sync with the global capabilities that serve as the source of truth.
This class implements a one-way synchronization from the global CREATE_GROUP
capability in All-Projects
to a CREATE
permission on refs/groups/*
in
All-Users
.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.google.gerrit.extensions.events.ChangeMergedListener
ChangeMergedListener.Event
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
Checks ifGlobalCapability.CREATE_GROUP
andCREATE
permission onrefs/groups/*
have diverged and syncs them by applying theCREATE
permission torefs/groups/*
.
-
Method Details
-
syncIfNeeded
Checks ifGlobalCapability.CREATE_GROUP
andCREATE
permission onrefs/groups/*
have diverged and syncs them by applying theCREATE
permission torefs/groups/*
.- Throws:
IOException
org.eclipse.jgit.errors.ConfigInvalidException
-
onChangeMerged
- Specified by:
onChangeMerged
in interfaceChangeMergedListener
-