MerginMaps / MerginMaps/qgis-plugin
Add @mm_project_role QGIS variable for the current user's project role
@harminius is already working on this.
Since Sep 14, 2026.
- Dominant language
- Python
- Stars
- 44
- Forks
- 20
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 5
Description
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.
This variable needs to be added also in offline mode.
Role values users will see are reader, editor, writer and owner.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.