Examples of grantWeblogPermission()


Examples of org.apache.roller.weblogger.business.UserManager.grantWeblogPermission()

                                    perms.getWeblog(), perms.getUser(), WeblogPermission.ALL_ACTIONS);
                            removed++;
                        } else {
                            userMgr.revokeWeblogPermission(
                                    perms.getWeblog(), perms.getUser(), WeblogPermission.ALL_ACTIONS);
                            userMgr.grantWeblogPermission(
                                    perms.getWeblog(), perms.getUser(), Utilities.stringToStringList(sval, ","));
                            changed++;
                        }
                    }
                }
View Full Code Here

Examples of org.apache.roller.weblogger.business.UserManager.grantWeblogPermission()

       
        // create permissions
        List<String> actions = new ArrayList<String>();
        actions.add(WeblogPermission.ADMIN);
        actions.add(WeblogPermission.POST);
        mgr.grantWeblogPermission(testWeblog, testUser, actions);
        TestUtils.endSession(true);
       
        // check that create was successful
        testWeblog = TestUtils.getManagedWebsite(testWeblog);
        testUser = TestUtils.getManagedUser(testUser);
View Full Code Here

Examples of org.apache.roller.weblogger.business.UserManager.grantWeblogPermission()

        // revoke those same permissions
        mgr.revokeWeblogPermission(perm.getWeblog(), perm.getUser(), WeblogPermission.ALL_ACTIONS);
        TestUtils.endSession(true);
       
        // add only draft permission
        mgr.grantWeblogPermission(testWeblog, testUser,
                Collections.singletonList(WeblogPermission.EDIT_DRAFT));
        TestUtils.endSession(true);

        // check that user has draft permisson only
        testWeblog = TestUtils.getManagedWebsite(testWeblog);
View Full Code Here

Examples of org.apache.roller.weblogger.business.UserManager.grantWeblogPermission()

                                    perms.getWeblog(), perms.getUser(), WeblogPermission.ALL_ACTIONS);
                            removed++;
                        } else {
                            userMgr.revokeWeblogPermission(
                                    perms.getWeblog(), perms.getUser(), WeblogPermission.ALL_ACTIONS);
                            userMgr.grantWeblogPermission(
                                    perms.getWeblog(), perms.getUser(), Utilities.stringToStringList(sval, ","));
                            changed++;
                        }
                    }
                }
View Full Code Here

Examples of org.apache.roller.weblogger.business.UserManager.grantWeblogPermission()

            List<WeblogPermission> perms= new ArrayList<WeblogPermission>();
            for (int i = 0; i < c.getEntries().length; i++) {
                MemberEntry entry = (MemberEntry)c.getEntries()[i];
                User ud = getUserData(entry.getName());
                Weblog wd = getWebsiteData(entry.getHandle());
                mgr.grantWeblogPermission(wd, ud, toActionList(entry.getPermission()));
                getRoller().flush();
                CacheManager.invalidate(ud);
                CacheManager.invalidate(wd);
               
                WeblogPermission pd = mgr.getWeblogPermission(wd, ud);
View Full Code Here

Examples of org.apache.roller.weblogger.business.UserManager.grantWeblogPermission()

            User ud = getUserData(entry.getName());
            Weblog wd = getWebsiteData(entry.getHandle());
           
            UserManager mgr = getRoller().getUserManager();
            mgr.revokeWeblogPermission(wd, ud, WeblogPermission.ALL_ACTIONS);
            mgr.grantWeblogPermission(wd, ud, stringToActionList(entry.getPermission()));
           
            getRoller().flush();
           
            CacheManager.invalidate(ud);
            CacheManager.invalidate(wd);
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.