Package org.fao.geonet.repository

Examples of org.fao.geonet.repository.GroupRepository.findAllAsXml()


        final UserGroupRepository userGroupRepository = context.getBean(UserGroupRepository.class);
        final Sort sort = SortUtils.createSort(Group_.id);

        UserSession session = context.getUserSession();
        if (!session.isAuthenticated()) {
            return groupRepository.findAllAsXml(Specifications.not(GroupSpecs.isReserved()), sort);
        }

        Element result;
        // you're Administrator
        if (Profile.Administrator == session.getProfile()) {
View Full Code Here


        Element result;
        // you're Administrator
        if (Profile.Administrator == session.getProfile()) {
            // return all groups
            result = groupRepository.findAllAsXml(null, sort);
        } else {
            Specifications<UserGroup> spec = Specifications.where(UserGroupSpecs.hasUserId(session.getUserIdAsInt()));
            // you're no Administrator
            // retrieve your groups
      if (profile != null) {
View Full Code Here

                    ids.add(reservedGroup.getId());
                }
            }

            // retrieve all groups
            Element groups = groupRepository.findAllAsXml(null, sort);

            // filter all groups so only your groups (+ maybe system groups) are retained
            result = Lib.element.pruneChildren(groups, ids);
    }
        return result;
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.