Package org.jahia.services.usermanager

Examples of org.jahia.services.usermanager.JahiaGroupManagerService.createGroup()


                    site.setMixLanguagesActive(false);

                    // create default groups...
                    JahiaGroup usersGroup = jgms.lookupGroup(0, JahiaGroupManagerService.USERS_GROUPNAME);
                    if (usersGroup == null) {
                        usersGroup = jgms.createGroup(0, JahiaGroupManagerService.USERS_GROUPNAME, null, false);
                    }

                    JahiaGroup guestGroup = jgms.lookupGroup(0, JahiaGroupManagerService.GUEST_GROUPNAME);
                    if (guestGroup == null) {
                        guestGroup = jgms.createGroup(0, JahiaGroupManagerService.GUEST_GROUPNAME, null, false);
View Full Code Here


                        usersGroup = jgms.createGroup(0, JahiaGroupManagerService.USERS_GROUPNAME, null, false);
                    }

                    JahiaGroup guestGroup = jgms.lookupGroup(0, JahiaGroupManagerService.GUEST_GROUPNAME);
                    if (guestGroup == null) {
                        guestGroup = jgms.createGroup(0, JahiaGroupManagerService.GUEST_GROUPNAME, null, false);
                    }

                    JahiaGroup privGroup = jgms.lookupGroup(0, JahiaGroupManagerService.PRIVILEGED_GROUPNAME);
                    if (privGroup == null) {
                        privGroup = jgms.createGroup(0, JahiaGroupManagerService.PRIVILEGED_GROUPNAME, null, true);
View Full Code Here

                        guestGroup = jgms.createGroup(0, JahiaGroupManagerService.GUEST_GROUPNAME, null, false);
                    }

                    JahiaGroup privGroup = jgms.lookupGroup(0, JahiaGroupManagerService.PRIVILEGED_GROUPNAME);
                    if (privGroup == null) {
                        privGroup = jgms.createGroup(0, JahiaGroupManagerService.PRIVILEGED_GROUPNAME, null, true);
                    }

                    JahiaGroup adminGroup = jgms.lookupGroup(site.getID(),
                            JahiaGroupManagerService.SITE_ADMINISTRATORS_GROUPNAME);
                    if (adminGroup == null) {
View Full Code Here

                    }

                    JahiaGroup adminGroup = jgms.lookupGroup(site.getID(),
                            JahiaGroupManagerService.SITE_ADMINISTRATORS_GROUPNAME);
                    if (adminGroup == null) {
                        adminGroup = jgms.createGroup(site.getID(), JahiaGroupManagerService.SITE_ADMINISTRATORS_GROUPNAME, null,
                                false);
                    }

                    // attach superadmin user (current) to administrators group...
                    adminGroup.addMember(currentUser);
View Full Code Here

                    if (!siteKey.equals(SYSTEM_SITE_KEY)) {
                        JahiaGroup sitePrivGroup = jgms.lookupGroup(site.getID(),
                                JahiaGroupManagerService.SITE_PRIVILEGED_GROUPNAME);
                        if (sitePrivGroup == null) {
                            sitePrivGroup = jgms.createGroup(site.getID(), JahiaGroupManagerService.SITE_PRIVILEGED_GROUPNAME, null,
                                    false);
                        }
                        // atach site privileged group to server privileged
                        privGroup.addMember(sitePrivGroup);
                    }
View Full Code Here

            properties.setProperty("j:firstName", "John");
            properties.setProperty("j:lastName", "Smoe");
//            properties.setProperty("j:email", "johnsmoe@localhost.com");
            johnsmoe = userManagerService.createUser("johnsmoe", "johnsmoe", properties);
        }
        group = groupManagerService.createGroup(site.getID(), "taskUsersGroup", new Properties(), true);
        group.addMember(johndoe);
        group.addMember(johnsmoe);

//        RoleBasedAccessControlService roleService = (RoleBasedAccessControlService) SpringContextSingleton.getInstance().getContext().getBean("org.jahia.services.rbac.jcr.RoleBasedAccessControlService");
//        if(roleService!=null){
View Full Code Here

        user4 = userManager.createUser("user4", "password", new Properties());

        JahiaGroupManagerService groupManager = ServicesRegistry.getInstance().getJahiaGroupManagerService();
        assertNotNull("JahiaGroupManagerService cannot be retrieved", groupManager);

        group1 = groupManager.createGroup(site.getID(), "group1", new Properties(), false);
        group2 = groupManager.createGroup(site.getID(), "group2", new Properties(), false);

        group1.addMember(user1);
        group1.addMember(user2);
View Full Code Here

        JahiaGroupManagerService groupManager = ServicesRegistry.getInstance().getJahiaGroupManagerService();
        assertNotNull("JahiaGroupManagerService cannot be retrieved", groupManager);

        group1 = groupManager.createGroup(site.getID(), "group1", new Properties(), false);
        group2 = groupManager.createGroup(site.getID(), "group2", new Properties(), false);

        group1.addMember(user1);
        group1.addMember(user2);

        group2.addMember(user3);
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.