Package org.encuestame.persistence.domain.security

Examples of org.encuestame.persistence.domain.security.Permission


    /**
     * Test SecPermission Domain.
     **/
    @Test
    public void testSecPermission(){
        final Permission permission = new Permission();
        permission.setPermission(EnMePermission.getPermissionString("ENCUESTAME_ADMIN"));
        permission.setPermissionDescription("Administrator of alls options");
        permission.getGroups().add(createGroups("administrator"));
        permission.getSecUserSecondaries().add(createUserAccount("juan carlos", createAccount()));
        getPermissionDaoImp().saveOrUpdate(permission);
        assertNotNull(permission.getIdPermission());
    }
View Full Code Here


    /**
     * Test Add Permission to Group.
     */
    @Test
    public void testAddPermissionToGroup(){
        final Permission editor = createPermission("editor");
        final Permission admon = createPermission("publisher");
        final Permission permission = createPermission("administrator");
        final Group group = createGroups("group 1");
        group.getPermissions().add(editor);
        group.getPermissions().add(admon);
        group.getPermissions().add(permission);
        getGroup().saveOrUpdate(group);
View Full Code Here

TOP

Related Classes of org.encuestame.persistence.domain.security.Permission

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.