Package org.apache.jetspeed.om.registry

Examples of org.apache.jetspeed.om.registry.SecurityEntry.grantGroupAccess()


                SecurityEntry entry = (SecurityEntry)Registry.createEntry(Registry.SECURITY);
                entry.setName("test");
                entry.setDescription("description");
                entry.setTitle("The Title");
                entry.grantRoleAccess("*", "admin");
                entry.grantGroupAccess("view", "sales");
                entry.grantGroupAccess("edit", "sales");
                entry.grantGroupAccess("edit", "marketing");
                entry.grantGroupAccess("edit", "accounting");

                assertSimpleConstraints(entry);
View Full Code Here


                entry.setName("test");
                entry.setDescription("description");
                entry.setTitle("The Title");
                entry.grantRoleAccess("*", "admin");
                entry.grantGroupAccess("view", "sales");
                entry.grantGroupAccess("edit", "sales");
                entry.grantGroupAccess("edit", "marketing");
                entry.grantGroupAccess("edit", "accounting");

                assertSimpleConstraints(entry);
                   
View Full Code Here

                entry.setDescription("description");
                entry.setTitle("The Title");
                entry.grantRoleAccess("*", "admin");
                entry.grantGroupAccess("view", "sales");
                entry.grantGroupAccess("edit", "sales");
                entry.grantGroupAccess("edit", "marketing");
                entry.grantGroupAccess("edit", "accounting");

                assertSimpleConstraints(entry);
                   
                Registry.addEntry(Registry.SECURITY, (RegistryEntry)entry);
View Full Code Here

                entry.setTitle("The Title");
                entry.grantRoleAccess("*", "admin");
                entry.grantGroupAccess("view", "sales");
                entry.grantGroupAccess("edit", "sales");
                entry.grantGroupAccess("edit", "marketing");
                entry.grantGroupAccess("edit", "accounting");

                assertSimpleConstraints(entry);
                   
                Registry.addEntry(Registry.SECURITY, (RegistryEntry)entry);
            }
View Full Code Here

            assertSimpleConstraints(se);
           
            SecurityEntry se2 = (SecurityEntry)Registry.getEntry(Registry.SECURITY, "test");
            assertSimpleConstraints(se2);
            se2.revokeGroupAccess("edit", "accounting");
            se2.grantGroupAccess("view", "accounting");
           
            Registry.saveEntry(Registry.SECURITY, (RegistryEntry)se2);
            Registry.removeEntry(Registry.SECURITY, "test");
           
        }
View Full Code Here

    throws Exception
    {
        System.out.println("Testing Group Security Registry Cache...");
       
        SecurityEntry entry = createSecurityEntry("test-group-security");
        entry.grantGroupAccess("view", "users");
        entry.grantGroupAccess("view", "hackers");
        entry.grantGroupAccess("edit", "managers");
        entry.grantGroupAccess("view", "managers");
       
        assertTrue("group-assert: view/users", entry.allowsGroup("users", "view"));
View Full Code Here

    {
        System.out.println("Testing Group Security Registry Cache...");
       
        SecurityEntry entry = createSecurityEntry("test-group-security");
        entry.grantGroupAccess("view", "users");
        entry.grantGroupAccess("view", "hackers");
        entry.grantGroupAccess("edit", "managers");
        entry.grantGroupAccess("view", "managers");
       
        assertTrue("group-assert: view/users", entry.allowsGroup("users", "view"));
        assertTrue("group-assert: view/hackers", entry.allowsGroup("hackers", "view"));
View Full Code Here

        System.out.println("Testing Group Security Registry Cache...");
       
        SecurityEntry entry = createSecurityEntry("test-group-security");
        entry.grantGroupAccess("view", "users");
        entry.grantGroupAccess("view", "hackers");
        entry.grantGroupAccess("edit", "managers");
        entry.grantGroupAccess("view", "managers");
       
        assertTrue("group-assert: view/users", entry.allowsGroup("users", "view"));
        assertTrue("group-assert: view/hackers", entry.allowsGroup("hackers", "view"));
        assertTrue("group-assert: view/managers", entry.allowsGroup("managers", "view"));
View Full Code Here

       
        SecurityEntry entry = createSecurityEntry("test-group-security");
        entry.grantGroupAccess("view", "users");
        entry.grantGroupAccess("view", "hackers");
        entry.grantGroupAccess("edit", "managers");
        entry.grantGroupAccess("view", "managers");
       
        assertTrue("group-assert: view/users", entry.allowsGroup("users", "view"));
        assertTrue("group-assert: view/hackers", entry.allowsGroup("hackers", "view"));
        assertTrue("group-assert: view/managers", entry.allowsGroup("managers", "view"));
        assertTrue("group-assert: edit/managers", entry.allowsGroup("managers", "edit"));
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.