@Override public boolean canContinue(CruiseConfig cruiseConfig) { if (goConfigService.groups().hasGroup(groupName) && !goConfigService.isUserAdminOfGroup(currentUser.getUsername(), groupName)) { result.unauthorized( LocalizedMessage.string("UNAUTHORIZED_TO_EDIT_GROUP", groupName), HealthStateType.unauthorised()); return false; } return true; }
public boolean isUserAdminOfGroup(final CaseInsensitiveString userName, String groupName) { return goConfigService.isUserAdminOfGroup(userName, groupName); }
private boolean isUserAdminOfGroup(final CaseInsensitiveString userName, PipelineConfigs group) { return goConfigService.isUserAdminOfGroup(userName, group); }