Package org.jitterbit.integration.server.data

Examples of org.jitterbit.integration.server.data.EntityDescriptor


            }
            Long dbId = guidToIdMapper.getId(entityId);
            if (dbId == null) {
                return false;
            }
            EntityDescriptor ed = new EntityDescriptor(entityId.getEntityType(), dbId);
            return hasPermissionImpl(user, ed, p, false);
        } catch (GuidToIdMappingException ex) {
            throw new AccessLookupException(ex);
        }
    }
View Full Code Here


    public static void main(String[] args) throws Exception {
        Connection conn = ServerDbInfo.getTranDbConnectionInfo().getConnection();
        try {
            Group group = new Group(1, "Users");
            EntityDescriptor entity = new EntityDescriptor(EntityType.Operation, 2);
            Permissions p = new TranDbGroupPermissionsLookup(conn).getPermissions(group, entity);
            System.out.println(p);
        } finally {
            KongaDbUtils.close(conn);
        }
View Full Code Here

    public static void main(String[] args) throws Exception {
        Connection conn = ServerDbInfo.getTranDbConnectionInfo().getConnection();
        try {
            User user = new User(1, "torgil");
            EntityDescriptor entity = new EntityDescriptor(EntityType.Operation, 2);
            Permissions p = new TranDbUserPermissionsLookup(conn).getPermissions(user, entity);
            System.out.println(p);
        } finally {
            KongaDbUtils.close(conn);
        }
View Full Code Here

    @Test
    public void testExplicitDeny() {
        AccessController ctrl = new AccessController();
        ctrl.setGroupLookup(NO_GROUPS);
        ctrl.setUserPermissionsLookup(ALWAYS_DENY);
        EntityDescriptor ed = new EntityDescriptor(EntityType.Operation, 1);
        for (Permission p : Permission.values()) {
            // The user admin should always have full access, regardless of what the DB says
            assertTrue(ctrl.hasPermission(new User(0, "admin"), ed, p));
            for (int n = 1; n < 10; ++n) {
                assertFalse(ctrl.hasPermission(new User(n, "john.doe"), ed, p));
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.server.data.EntityDescriptor

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.