Package org.fao.geonet.repository

Examples of org.fao.geonet.repository.UserGroupRepository.deleteAllByIdAttribute()


            @Override
            public Integer apply(@Nonnull User input) {
                return input.getId();
            }
        });
        userGroupRepository.deleteAllByIdAttribute(UserGroupId_.userId, userIds);
        userRepository.deleteInBatch(usersFound);
    }
   
   
    private void synchronizeGroup(ApplicationContext applicationContext, String ldapGroupSearchFilter,
View Full Code Here


    Integer iId = Integer.valueOf(id);
        List<Integer> reindex = operationAllowedRepo.findAllIds(OperationAllowedSpecs.hasGroupId(iId), OperationAllowedId_.metadataId);

        operationAllowedRepo.deleteAllByIdAttribute(OperationAllowedId_.groupId, iId);
        userGroupRepo.deleteAllByIdAttribute(UserGroupId_.groupId, Arrays.asList(iId));
        groupRepo.delete(iId);
    //--- reindex affected metadata

    GeonetContext gc = (GeonetContext) context.getHandlerContext(Geonet.CONTEXT_NAME);
    DataManager   dm = gc.getBean(DataManager.class);
View Full Code Here

        setUserGroups(user, params, context);
      } else if (operation.equals(Params.Operation.FULLUPDATE) || operation.equals(Params.Operation.EDITINFO)) {
                user = userRepository.save(user);

                //--- add groups
                groupRepository.deleteAllByIdAttribute(UserGroupId_.userId, Arrays.asList(user.getId()));

                setUserGroups(user, params, context);
      } else if (operation.equals(Params.Operation.RESETPW)) {
             user = userRepository.save(user);
      } else {
View Full Code Here

      if (dataMan.isUserMetadataStatus(iId)) {
        throw new IllegalArgumentException("Cannot delete a user that has set a metadata status");
      }

            userGroupRepository.deleteAllByIdAttribute(UserGroupId_.userId, Arrays.asList(iId));
            context.getBean(UserRepository.class).delete(iId);
    } else {
      throw new IllegalArgumentException("You don't have rights to delete this user");
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.