Package org.apache.isis.security.shiro.authorization

Examples of org.apache.isis.security.shiro.authorization.IsisPermission


        assertThat(viewCustomerChangeAddress, permittedBy("*"));
    }
   
   
    private static Matcher<? super Permission> permittedBy(final String permissionString) {
        return permittedBy(new IsisPermission(permissionString));
    }
View Full Code Here


public class IsisPermissionTest_setParts {

    @Test
    public void noVeto() throws Exception {
        IsisPermission ip = new IsisPermission("com.mycompany.myapp:Customer:changeAddress:r");
        assertThat(ip.toString(), is("[com.mycompany.myapp]:[customer]:[changeaddress]:[r]"));
    }
View Full Code Here

        assertThat(ip.toString(), is("[com.mycompany.myapp]:[customer]:[changeaddress]:[r]"));
    }

    @Test
    public void withVetoableDomain() throws Exception {
        IsisPermission ip = new IsisPermission("foo/com.mycompany.myapp:Customer:changeAddress:r");
        assertThat(ip.toString(), is("foo/[com.mycompany.myapp]:[customer]:[changeaddress]:[r]"));
    }
View Full Code Here

        assertThat(ip.toString(), is("foo/[com.mycompany.myapp]:[customer]:[changeaddress]:[r]"));
    }

    @Test
    public void withVetoAndVetoableDomain() throws Exception {
        IsisPermission ip = new IsisPermission("!foo/com.mycompany.myapp:Customer:changeAddress:r");
        assertThat(ip.toString(), is("!foo/[com.mycompany.myapp]:[customer]:[changeaddress]:[r]"));
    }
View Full Code Here

    }

   
    @Test
    public void xxx() throws Exception {
        IsisPermission ip = new IsisPermission("schwartz/com.mycompany.myapp:Order:submit:*");
        IsisPermission ip2 = new IsisPermission("com.mycompany.myapp:Customer:remove:r");
       
        assertThat(ip2.implies(ip), is(false));
        assertThat(ip.implies(ip2), is(false));
    }
View Full Code Here

        assertThat(viewCustomerChangeAddress, permittedBy("*"));
    }
   
   
    private static Matcher<? super Permission> permittedBy(final String permissionString) {
        return permittedBy(new IsisPermission(permissionString));
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.security.shiro.authorization.IsisPermission

Copyright © 2018 www.massapicom. 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.