1 5 package com.opensymphony.workflow.util; 6 7 import com.opensymphony.module.propertyset.PropertySet; 8 9 import com.opensymphony.user.*; 10 11 import com.opensymphony.workflow.*; 12 13 import java.util.Map ; 14 15 16 22 public class OSUserGroupCondition implements Condition { 23 25 public boolean passesCondition(Map transientVars, Map args, PropertySet ps) { 26 try { 27 WorkflowContext context = (WorkflowContext) transientVars.get("context"); 28 User user = UserManager.getInstance().getUser(context.getCaller()); 29 30 return user.inGroup((String ) args.get("group")); 31 } catch (EntityNotFoundException e) { 32 return false; 33 } 34 } 35 } 36 | Popular Tags |