Move ChangeControl#getLabelTypes() to ProjectState and migrate callers
In an effort to make {Ref,Project,Change}Control package-private all
public methods that aren't replaced by PermissionBackend need to move
elsewhere. Both ProjectControl#getLabelTypes() and
ChangeControl#getLabelTypes() rely on the project state, so they
can move there. ChangeControl#getLabelTypes() needs the destination
branch and current user in addition, which are added as arguments.
Change-Id: I080fd93103679552952872dde49cc149a59cd43e
This commit is contained in:
@@ -221,7 +221,7 @@ class ProjectAccessFactory extends Handler<ProjectAccess> {
|
||||
|| (checkReadConfig && perm.ref(RefNames.REFS_CONFIG).testOrFalse(CREATE_CHANGE)));
|
||||
detail.setConfigVisible(pc.isOwner() || checkReadConfig);
|
||||
detail.setGroupInfo(buildGroupInfo(local));
|
||||
detail.setLabelTypes(pc.getLabelTypes());
|
||||
detail.setLabelTypes(pc.getProjectState().getLabelTypes());
|
||||
detail.setFileHistoryLinks(getConfigFileLogLinks(projectName.get()));
|
||||
return detail;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user