Package com.google.gerrit.server
Class CreateGroupPermissionSyncer
- java.lang.Object
-
- com.google.gerrit.server.CreateGroupPermissionSyncer
-
- All Implemented Interfaces:
ChangeMergedListener
public class CreateGroupPermissionSyncer extends Object implements ChangeMergedListener
With groups in NoteDb, the capability of creating a group is expressed as aCREATE
permission onrefs/groups/*
rather than a global capability inAll-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 inAll-Projects
to aCREATE
permission onrefs/groups/*
inAll-Users
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.google.gerrit.extensions.events.ChangeMergedListener
ChangeMergedListener.Event
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onChangeMerged(ChangeMergedListener.Event event)
void
syncIfNeeded()
Checks ifGlobalCapability.CREATE_GROUP
andCREATE
permission onrefs/groups/*
have diverged and syncs them by applying theCREATE
permission torefs/groups/*
.
-
-
-
Method Detail
-
syncIfNeeded
public void syncIfNeeded() throws IOException, org.eclipse.jgit.errors.ConfigInvalidException
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
public void onChangeMerged(ChangeMergedListener.Event event)
- Specified by:
onChangeMerged
in interfaceChangeMergedListener
-
-