if (passesConditions(security.getRestriction().getConditionType(), security.getRestriction().getConditions(), transientVars, ps)) { s.add(security.getName());
if (passesConditions(security.getRestriction().getConditionType(), security.getRestriction().getConditions(), transientVars, ps)) { s.add(security.getName()); }
    public List getSecurityPermissions(long id) throws WorkflowException {        WorkflowStore store = getPersistence();        WorkflowEntry entry = store.findEntry(id);        WorkflowDescriptor wf = getWorkflow(entry.getWorkflowName());        PropertySet ps = store.getPropertySet(id);        Map transientVars = new HashMap();        Collection currentSteps = store.findCurrentSteps(id);        populateTransientMap(entry, transientVars, wf.getRegisters(), null, currentSteps);        List s = new ArrayList();        for (Iterator interator = currentSteps.iterator(); interator.hasNext();) {            Step step = (Step) interator.next();            int stepId = step.getStepId();            StepDescriptor xmlStep = wf.getStep(stepId);            List securities = xmlStep.getPermissions();            for (Iterator iterator2 = securities.iterator();                    iterator2.hasNext();) {                PermissionDescriptor security = (PermissionDescriptor) iterator2.next();                // to have the permission, the condition must be met or not specified                // securities can't have restrictions based on inputs, so it's null                if (passesConditions(security.getRestriction().getConditionType(), security.getRestriction().getConditions(), transientVars, ps)) {                    s.add(security.getName());                }            }        }        return s;    }