Examples of WhitelistAuthorizer


Examples of org.apache.tapestry5.internal.services.WhitelistAuthorizer

public class WhitelistAuthorizerTest extends Assert {
   
    @Test
    public void run()
    {
        WhitelistAuthorizer auth = new WhitelistAuthorizer(Arrays.asList("foo"));
        assertEquals(auth.order().get(0), AssetPathAuthorizer.Order.ALLOW);
        assertEquals(auth.order().get(1), AssetPathAuthorizer.Order.DENY);
        assertEquals(auth.order().size(),2);
        assertTrue(auth.accessAllowed("foo"));
        assertFalse(auth.accessDenied("foo"));
       
        assertFalse(auth.accessAllowed("bar"));
        assertTrue(auth.accessDenied("bar"));
    }
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.