You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: remove broken GRANT/REVOKE EXECUTE ON WORKFLOW
Workflows$Workflow has no AllowedModuleRoles field in the Mendix metamodel
(confirmed by generated metamodel and BSON dump of Studio Pro output). The
GRANT/REVOKE EXECUTE ON WORKFLOW commands silently wrote a phantom field
that Studio Pro ignored. Replace with clear error messages explaining that
workflow access is controlled through triggering microflows and UserTask
targeting.
Copy file name to clipboardExpand all lines: docs-site/src/language/grant-revoke.md
+1-4Lines changed: 1 addition & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -134,10 +134,7 @@ REVOKE EXECUTE ON NANOFLOW <Module>.<Name> FROM <Module>.<Role> [, ...];
134
134
135
135
## Workflow Access
136
136
137
-
```sql
138
-
GRANT EXECUTE ON WORKFLOW <Module>.<Name> TO <Module>.<Role> [, ...];
139
-
REVOKE EXECUTE ON WORKFLOW <Module>.<Name>FROM<Module>.<Role> [, ...];
140
-
```
137
+
> **Not supported.** Mendix workflows do not have document-level `AllowedModuleRoles` (unlike microflows and pages). Workflow access is controlled through the microflow that triggers the workflow and UserTask targeting.
Copy file name to clipboardExpand all lines: docs-site/src/language/workflow-structure.md
+1-6Lines changed: 1 addition & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,12 +62,7 @@ DROP WORKFLOW HR.OnboardEmployee;
62
62
63
63
## Workflow Access
64
64
65
-
Grant or revoke execute access to control who can start a workflow:
66
-
67
-
```sql
68
-
GRANT EXECUTE ON WORKFLOW HR.OnboardEmployee TO HR.Manager, HR.Admin;
69
-
REVOKE EXECUTE ON WORKFLOW HR.OnboardEmployeeFROMHR.Manager;
70
-
```
65
+
> **Not supported.** Mendix workflows do not have document-level `AllowedModuleRoles` (unlike microflows and pages). Workflow access is controlled through the microflow that triggers the workflow and UserTask targeting.
Copy file name to clipboardExpand all lines: docs/01-project/MDL_FEATURE_MATRIX.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -204,7 +204,7 @@ Document types that exist in Mendix but have no MDL support:
204
204
|**JSON transformations**| Y | Y | Y | Y | Y | N | 20 | Y | N | N | P | N | N | N | N | N | N | JSON structure definitions |
205
205
|**Message definitions**| N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | Message definition documents |
206
206
|**XML schemas**| N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | Imported XML schema documents |
207
-
|**Workflows**| Y | Y | Y | N | Y | N | N | N | Y | Y | N | N | Y | N |Y|Y| N | SHOW/DESCRIBE/CREATE/DROP/GRANT/REVOKE implemented|
207
+
|**Workflows**| Y | Y | Y | N | Y | N | N | N | Y | Y | N | N | Y | N |N|N| N | SHOW/DESCRIBE/CREATE/DROP implemented; GRANT/REVOKE removed (workflows lack AllowedModuleRoles)|
208
208
|**Module settings**| N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | Module-level configuration |
209
209
|**Image collection**| N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | Image document collections |
210
210
|**Icon collection**| N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | Icon/glyph collections |
fmt.Fprintf(e.output, "No module roles granted execute access on %s.%s\n", modName, wf.Name)
335
-
returnnil
336
-
}
337
-
fmt.Fprintf(e.output, "Allowed module roles for %s.%s:\n", modName, wf.Name)
338
-
for_, role:=rangewf.AllowedModuleRoles {
339
-
fmt.Fprintf(e.output, " %s\n", string(role))
340
-
}
341
-
returnnil
342
-
}
343
-
}
344
-
345
-
returnfmt.Errorf("workflow not found: %s", name)
316
+
returnfmt.Errorf("SHOW ACCESS ON WORKFLOW is not supported: Mendix workflows do not have document-level AllowedModuleRoles (unlike microflows and pages). Workflow access is controlled through the microflow that triggers the workflow and UserTask targeting")
346
317
}
347
318
348
319
// showSecurityMatrix handles SHOW SECURITY MATRIX [IN module].
returnfmt.Errorf("failed to update workflow access: %w", err)
804
-
}
805
-
806
-
iflen(added) ==0 {
807
-
fmt.Fprintf(e.output, "All specified roles already have execute access on %s.%s\n", modName, wf.Name)
808
-
} else {
809
-
fmt.Fprintf(e.output, "Granted execute access on %s.%s to %s\n", modName, wf.Name, strings.Join(added, ", "))
810
-
}
811
-
returnnil
812
-
}
813
-
814
-
returnfmt.Errorf("workflow not found: %s.%s", s.Workflow.Module, s.Workflow.Name)
759
+
returnfmt.Errorf("GRANT EXECUTE ON WORKFLOW is not supported: Mendix workflows do not have document-level AllowedModuleRoles (unlike microflows and pages). Workflow access is controlled through the microflow that triggers the workflow and UserTask targeting")
815
760
}
816
761
817
762
// execRevokeWorkflowAccess handles REVOKE EXECUTE ON WORKFLOW Module.WF FROM roles.
763
+
// Mendix workflows do not have a document-level AllowedModuleRoles field (unlike
764
+
// microflows and pages), so this operation is not supported.
returnfmt.Errorf("failed to update workflow access: %w", err)
860
-
}
861
-
862
-
iflen(removed) ==0 {
863
-
fmt.Fprintf(e.output, "None of the specified roles had execute access on %s.%s\n", modName, wf.Name)
864
-
} else {
865
-
fmt.Fprintf(e.output, "Revoked execute access on %s.%s from %s\n", modName, wf.Name, strings.Join(removed, ", "))
866
-
}
867
-
returnnil
868
-
}
869
-
870
-
returnfmt.Errorf("workflow not found: %s.%s", s.Workflow.Module, s.Workflow.Name)
766
+
returnfmt.Errorf("REVOKE EXECUTE ON WORKFLOW is not supported: Mendix workflows do not have document-level AllowedModuleRoles (unlike microflows and pages). Workflow access is controlled through the microflow that triggers the workflow and UserTask targeting")
871
767
}
872
768
873
769
// validateModuleRole checks that a module role exists in the project.
0 commit comments