Package org.intalio.tempo.workflow.auth

Examples of org.intalio.tempo.workflow.auth.ACL


            throw new InvalidTaskException("Form URL is not valid", e);
        }
    }

    public void authorizeActionForUser(String action, String user) {
        ACL acl = getACLs(action);
        acl.getUserOwners().add(user);
    }
View Full Code Here


        ACL acl = getACLs(action);
        acl.getUserOwners().add(user);
    }

    public void authorizeActionForRole(String action, String role) {
        ACL acl = getACLs(action);
        acl.getRoleOwners().add(role);
    }
View Full Code Here

        ACL acl = getACLs(action);
        acl.getRoleOwners().add(role);
    }

    public void authorizeActionForUsers(String action, AuthIdentifierSet users) {
        ACL acl = getACLs(action);
        acl.getUserOwners().addAll(users);
    }
View Full Code Here

        ACL acl = getACLs(action);
        acl.getUserOwners().addAll(users);
    }

    public void authorizeActionForRoles(String action, AuthIdentifierSet roles) {
        ACL acl = getACLs(action);
        acl.getRoleOwners().addAll(roles);
    }
View Full Code Here

        ACL acl = getACLs(action);
        acl.getRoleOwners().addAll(roles);
    }

    private ACL getACLs(String action) {
        ACL acl = _actionACLs.get(action);
        if (acl == null) {
            acl = new ACL(action);
            _actionACLs.put(action, acl);
        }
        return acl;
    }
View Full Code Here

        }
        return acl;
    }

    public Collection<String> getAuthorizedUsers(String action) {
        ACL acl = _actionACLs.get(action);
        if (acl != null)
            return acl.getUserOwners();
        return new AuthIdentifierSet();
    }
View Full Code Here

            return acl.getUserOwners();
        return new AuthIdentifierSet();
    }

    public Collection<String> getAuthorizedRoles(String action) {
        ACL acl = _actionACLs.get(action);
        if (acl != null)
            return acl.getRoleOwners();
        return new AuthIdentifierSet();
    }
View Full Code Here

        return new AuthIdentifierSet();
    }

    public boolean isAuthorizedAction(UserRoles user, String action) {
        // Note: Action is authorized if there's no ACL provided (default)
        ACL acl = _actionACLs.get(action);
        return acl==null ? true : acl.isAuthorizedAction(user, action);
    }
View Full Code Here

        } catch (XmlValueOutOfRangeException e) {
            resultTask.setCreationDate(new Date());
        }

        for (String action : actions) {
            ACL acl = readACL(taskMetadata, action);
            authorize(resultTask, action, acl);
        }

        if (ITaskWithState.class.isAssignableFrom(taskClass)) {
            ITaskWithState taskWithState = (ITaskWithState) resultTask;
View Full Code Here

            resultTask.authorizeActionForRole(action, role);
        }
    }

    private ACL readACL(XmlObject root, String action) {
        ACL acl = new ACL();
        XmlObject el = expectElement(root, action + "Action");
        if (el != null) {
            acl.getUserOwners().addAll(expectAuthIdentifiers(el, "user"));
            acl.getRoleOwners().addAll(expectAuthIdentifiers(el, "role"));
        }
        return acl;
    }
View Full Code Here

TOP

Related Classes of org.intalio.tempo.workflow.auth.ACL

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.