Add @mm_project_role QGIS variable for the current user's project role
@xkello is already working on this.
Since Sep 21, 2026.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- cpp
- Domain
- mobile-dev
Research direction
Start by tracing the existing mm_* variables in the mobile app and checking the plugin's displayed project-role values. Review the expression and form-default integration plus offline and sync handling; done means @mm_project_role returns the matching role, is empty in the stated inactive cases, and produces the same result in QGIS and the field.
Written by the indexing model from the issue text.
Description
Current situation
The current user's role on a project isn't reachable from 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, returning the current user's role on the active project, usable in expressions and form default values (like the other mm_* variables in the mobile app).
Expected behavior (user's view)
- Returns the user's role on the open project as text.
- Works offline and stays correct after syncing.
- Empty when signed out or the project isn't a Mergin project.
The same expression must give the same result in QGIS and in the field, so the variable name and role values need to match the plugin exactly.
Role values users will see are reader, editor, writer, owner. Should mirror what the app already shows for roles.
- Dominant language
- C++
- Stars
- 388
- Forks
- 87
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 23
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.
More from MerginMaps/mobile
-
bug ui/ux
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
MerginMaps/mobile#4669 ·
-
bug Good first issue ui/ux
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
MerginMaps/mobile#4665 ·
-
bug ui/ux
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
MerginMaps/mobile#4647 · 1 comment ·
-
enhancement sync
MerginMaps/mobile#4713 · 2 assignees ·
-
enhancement performance qgis
Difficulty 4/5 3-5 days Newbie friendliness 35/100
MerginMaps/mobile#4701 ·
All issues in MerginMaps/mobile
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
ArthurSonzogni/FTXUI#1363 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
ginkgo-project/ginkgo#2108 ·
-
bug build
Difficulty 1/5 Under an hour Newbie friendliness 91/100
facebookincubator/velox#19194 ·
-
JIT-compiled number -> Decimal conversion silently overflows instead of raising DECIMAL_OVERFLOW Openfuzz
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
ClickHouse/ClickHouse#122114 ·