public class CreateGroupPermissionSyncer extends java.lang.Object implements ChangeMergedListener
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
.
ChangeMergedListener.Event
Modifier and Type | Method and Description |
---|---|
void |
onChangeMerged(ChangeMergedListener.Event event) |
void |
syncIfNeeded()
Checks if
GlobalCapability.CREATE_GROUP and CREATE permission on refs/groups/* have diverged and syncs them by applying the CREATE permission to refs/groups/* . |
public void syncIfNeeded() throws java.io.IOException, org.eclipse.jgit.errors.ConfigInvalidException
GlobalCapability.CREATE_GROUP
and CREATE
permission on refs/groups/*
have diverged and syncs them by applying the CREATE
permission to refs/groups/*
.java.io.IOException
org.eclipse.jgit.errors.ConfigInvalidException
public void onChangeMerged(ChangeMergedListener.Event event)
onChangeMerged
in interface ChangeMergedListener