예제 #1
0
 @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;
 }
예제 #2
0
 public boolean isUserAdminOfGroup(final CaseInsensitiveString userName, String groupName) {
   return goConfigService.isUserAdminOfGroup(userName, groupName);
 }
예제 #3
0
 private boolean isUserAdminOfGroup(final CaseInsensitiveString userName, PipelineConfigs group) {
   return goConfigService.isUserAdminOfGroup(userName, group);
 }