Security Statements
Statements for managing project security: module roles, user roles, entity access rules, microflow and page access, demo users, and project-level security settings.
Mendix security operates at two levels. Module roles define permissions within a single module (entity access, microflow execution, page visibility). User roles aggregate module roles into project-wide identities assigned to end users.
Statements
| Statement | Description |
|---|---|
| CREATE MODULE ROLE | Create a role within a module |
| CREATE USER ROLE | Create a project-level user role aggregating module roles |
| GRANT | Grant entity, microflow, page, or nanoflow access to roles |
| REVOKE | Remove previously granted access |
| CREATE DEMO USER | Create a demo user for development and testing |
| UPDATE SECURITY | Re-sync entity access rules with the domain model (CE0066) |
Related Statements
| Statement | Syntax |
|---|---|
| Show project security | SHOW PROJECT SECURITY |
| Show module roles | SHOW MODULE ROLES [IN module] |
| Show user roles | SHOW USER ROLES |
| Show demo users | SHOW DEMO USERS |
| Show access on element | SHOW ACCESS ON [ENTITY|MICROFLOW|PAGE|NANOFLOW] module.Name |
| Show security matrix | SHOW SECURITY MATRIX [IN module] |
| Alter project security level | ALTER PROJECT SECURITY LEVEL OFF|PROTOTYPE|PRODUCTION |
| Toggle demo users | ALTER PROJECT SECURITY DEMO USERS ON|OFF |
| Toggle strict mode | ALTER PROJECT SECURITY STRICT MODE ON|OFF |
| Toggle guest access | ALTER PROJECT SECURITY GUEST ACCESS ON [ROLE UserRole]|OFF |
| Drop module role | DROP MODULE ROLE module.Role |
| Drop user role | DROP USER ROLE [IF EXISTS] Name |
| Drop demo user | DROP DEMO USER [IF EXISTS] 'username' |
| Alter user role | ALTER USER ROLE Name ADD|REMOVE MODULE ROLES (module.Role, ...) |