Пример #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);
 }