MerginMaps / MerginMaps/qgis-plugin

Add @mm_project_role QGIS variable for the current user's project role

Open
#935 1 comment 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.