Package org.openengsb.connector.wicketacl

Examples of org.openengsb.connector.wicketacl.WicketPermission


        context.putBean("serviceManager", serviceManager);

        userManager = new UserManagerStub();
        userManager.createUser("test");
        userManager.setUserCredentials("test", "password", "password");
        userManager.addPermissionToUser("test", new WicketPermission("USER"));
        userManager.addPermissionToUser("test", new WicketPermission("INDEX"));

        userManager.createUser("user");
        userManager.setUserCredentials("user", "password", "password");
        userManager.addPermissionToUser("user", new WicketPermission("INDEX"));

        userManager.createUser("admin");
        userManager.setUserCredentials("admin", "password", "password");
        userManager.addPermissionToUser("admin", new RootPermission());
        context.putBean("userManager", userManager);
View Full Code Here


*/
public class RoleAuthorizationTest extends AbstractLoginTest {

    @Before
    public void setUp() throws Exception {
        userManager.addPermissionToUser("test", new WicketPermission("SERVICE_USER"));
    }
View Full Code Here

        assertThat(accessControl.checkAccess("admin", uiAction), is(Access.GRANTED));
    }

    @Test
    public void testWicketAccess_shouldGrant() throws Exception {
        userManager.addPermissionToUser("testuser", new WicketPermission("MyPage"));
        assertThat(accessControl.checkAccess("testuser", uiAction), is(Access.GRANTED));
    }
View Full Code Here

        assertThat(accessControl.checkAccess("testuser", uiAction), is(Access.GRANTED));
    }

    @Test
    public void testWicketAccessWithContext_shouldGrant() throws Exception {
        userManager.addPermissionToUser("testuser", new WicketPermission("MyPage", null, "foo"));
        assertThat(accessControl.checkAccess("testuser", uiAction), is(Access.GRANTED));
    }
View Full Code Here

        assertThat(accessControl.checkAccess("testuser", uiAction), is(Access.GRANTED));
    }

    @Test
    public void testWicketAccessWithContext_shouldAbstain() throws Exception {
        userManager.addPermissionToUser("testuser", new WicketPermission("MyPage", null, "bar"));
        assertThat(accessControl.checkAccess("testuser", uiAction), is(Access.ABSTAINED));
    }
View Full Code Here

TOP

Related Classes of org.openengsb.connector.wicketacl.WicketPermission

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.