feat(oa): add initiator system field to condition branches
Allow __initiator__ contains matching in publish validation and the flow designer candidate list, excluding it from form useInCondition locks. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
3d88f52e2e
commit
22be6d8b36
7 files changed
+103
-23
No files matched your search
@@ -1431,7 +1431,12 @@ def _eval_condition_rules(
|
||||
if op == "contains":
|
||||
if field == INITIATOR_CONDITION_FIELD:
|
||||
uid = (initiator_user_id or "").strip()
|
||||
allowed = {str(x or "").strip() for x in (val or [])}
|
||||
if isinstance(val, list):
|
||||
allowed = {str(x or "").strip() for x in val if str(x or "").strip()}
|
||||
elif isinstance(val, str) and val.strip():
|
||||
allowed = {val.strip()}
|
||||
else:
|
||||
allowed = set()
|
||||
if not uid or uid not in allowed:
|
||||
return False
|
||||
continue
|
||||
|
||||
Reference in new issue
Block a user