Current situation
The current user's role on a project isn't available to expressions, so authors can't set up expression-based behaviour that depends on the user's role.
What we want
A new Mergin variable, @mm_project_role, alongside the existing mm_* set, returning the current user's role on the active project for use in expressions and default values. Add it to the Variables docs page.
Expected behaviour
- returns the user's role on the active project as text.
- refreshes when the role could change (switching projects, after sync, signing in/out).
- remains empty when signed out.
Authors build one expression and expect it to work the same in the field, so the variable name and role values must match the mobile app.
TBD: which role values users will see (reader/editor/writer/owner, and whether admin appears).
Current situation
The current user's role on a project isn't available to expressions, so authors can't set up expression-based behaviour that depends on the user's role.
What we want
A new Mergin variable,
@mm_project_role, alongside the existing mm_* set, returning the current user's role on the active project for use in expressions and default values. Add it to the Variables docs page.Expected behaviour
Authors build one expression and expect it to work the same in the field, so the variable name and role values must match the mobile app.
TBD: which role values users will see (reader/editor/writer/owner, and whether admin appears).