Examples of allowsUser()


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

                {
                    entryFound = true;
                    assertEquals("User joe_customer is not allowed", false,
                                 securityEntry.allowsUser("joe_customer", "do_any_thing"));
                    assertEquals("User joe_customer is not allowed", false,
                                 securityEntry.allowsUser("joe_customer", "do_any_thing", "joe_owner"));
                    assertEquals("User joe_owner is allowed", true,
                                 securityEntry.allowsUser("joe_owner", "do_any_thing", "joe_owner"));
                }
            }
            assertTrue("Found owner_only security entry", entryFound);
View Full Code Here

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

                    assertEquals("User joe_customer is not allowed", false,
                                 securityEntry.allowsUser("joe_customer", "do_any_thing"));
                    assertEquals("User joe_customer is not allowed", false,
                                 securityEntry.allowsUser("joe_customer", "do_any_thing", "joe_owner"));
                    assertEquals("User joe_owner is allowed", true,
                                 securityEntry.allowsUser("joe_owner", "do_any_thing", "joe_owner"));
                }
            }
            assertTrue("Found owner_only security entry", entryFound);
        }
    }
View Full Code Here

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

        {
            Log.warn("Security id " + securityRef.getParent() + " does not exist.  This was requested by the user " + user.getUserName());
            return false;
        }

        if (securityEntry.allowsUser(user.getUserName(), action, owner))
        {
            return true;
        }

        try
View Full Code Here

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

        entry.grantUserAccess("view", "joey");
        entry.grantUserAccess("view", "deedee");
        entry.grantUserAccess("edit", "johnny");
        entry.grantUserAccess("view", "johnny");
       
        assertTrue("User-assert: view/joey", entry.allowsUser("joey", "view"));
        assertTrue("User-assert: view/deedee", entry.allowsUser("deedee", "view"));
        assertTrue("User-assert: view/johnny", entry.allowsUser("johnny", "view"));
        assertTrue("User-assert: edit/johnny", entry.allowsUser("johnny", "edit"));
       
        assertTrue("false User-assert: edit/deedee", !entry.allowsUser("deedee", "edit"));
View Full Code Here

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

        entry.grantUserAccess("view", "deedee");
        entry.grantUserAccess("edit", "johnny");
        entry.grantUserAccess("view", "johnny");
       
        assertTrue("User-assert: view/joey", entry.allowsUser("joey", "view"));
        assertTrue("User-assert: view/deedee", entry.allowsUser("deedee", "view"));
        assertTrue("User-assert: view/johnny", entry.allowsUser("johnny", "view"));
        assertTrue("User-assert: edit/johnny", entry.allowsUser("johnny", "edit"));
       
        assertTrue("false User-assert: edit/deedee", !entry.allowsUser("deedee", "edit"));
       
View Full Code Here

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

        entry.grantUserAccess("edit", "johnny");
        entry.grantUserAccess("view", "johnny");
       
        assertTrue("User-assert: view/joey", entry.allowsUser("joey", "view"));
        assertTrue("User-assert: view/deedee", entry.allowsUser("deedee", "view"));
        assertTrue("User-assert: view/johnny", entry.allowsUser("johnny", "view"));
        assertTrue("User-assert: edit/johnny", entry.allowsUser("johnny", "edit"));
       
        assertTrue("false User-assert: edit/deedee", !entry.allowsUser("deedee", "edit"));
       
        entry.revokeUserAccess("view", "deedee");
View Full Code Here

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

        entry.grantUserAccess("view", "johnny");
       
        assertTrue("User-assert: view/joey", entry.allowsUser("joey", "view"));
        assertTrue("User-assert: view/deedee", entry.allowsUser("deedee", "view"));
        assertTrue("User-assert: view/johnny", entry.allowsUser("johnny", "view"));
        assertTrue("User-assert: edit/johnny", entry.allowsUser("johnny", "edit"));
       
        assertTrue("false User-assert: edit/deedee", !entry.allowsUser("deedee", "edit"));
       
        entry.revokeUserAccess("view", "deedee");
View Full Code Here

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

        assertTrue("User-assert: view/joey", entry.allowsUser("joey", "view"));
        assertTrue("User-assert: view/deedee", entry.allowsUser("deedee", "view"));
        assertTrue("User-assert: view/johnny", entry.allowsUser("johnny", "view"));
        assertTrue("User-assert: edit/johnny", entry.allowsUser("johnny", "edit"));
       
        assertTrue("false User-assert: edit/deedee", !entry.allowsUser("deedee", "edit"));
       
        entry.revokeUserAccess("view", "deedee");

        assertTrue("false User-revoked-assert: view/deedee", !entry.allowsUser("deedee", "view"));
        assertTrue("User-assert: view/joey", entry.allowsUser("joey", "view"));
View Full Code Here

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

       
        assertTrue("false User-assert: edit/deedee", !entry.allowsUser("deedee", "edit"));
       
        entry.revokeUserAccess("view", "deedee");

        assertTrue("false User-revoked-assert: view/deedee", !entry.allowsUser("deedee", "view"));
        assertTrue("User-assert: view/joey", entry.allowsUser("joey", "view"));

        assertTrue("User-specific: view/johnny", entry.allowsSpecificUser("view", "johnny"));
       
        System.out.println("Security User Registry Cache Test done.");       
View Full Code Here

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

        assertTrue("false User-assert: edit/deedee", !entry.allowsUser("deedee", "edit"));
       
        entry.revokeUserAccess("view", "deedee");

        assertTrue("false User-revoked-assert: view/deedee", !entry.allowsUser("deedee", "view"));
        assertTrue("User-assert: view/joey", entry.allowsUser("joey", "view"));

        assertTrue("User-specific: view/johnny", entry.allowsSpecificUser("view", "johnny"));
       
        System.out.println("Security User Registry Cache Test done.");       
    }
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.