Skip to content

add @mm_projext_role variable - #950

Merged
harminius merged 2 commits into
masterfrom
feat/mm-project-role-global
Sep 24, 2026
Merged

harminius merged 2 commits into
masterfrom
feat/mm-project-role-global

Conversation

@harminius

Copy link
Copy Markdown
Contributor

Resolves #935

Adds @mm_project_role, a QGIS variable holding the current user's role on the active Mergin Maps project.

This replaces #943, which was reverted in #949. The role is a property of the signed in user, so it is now a global variable and never touches the project file.

Trigger Function Where the value comes from Network
Open or switch project on_qgis_project_changed metadata via set_qgis_project_mergin_variables, then refresh_project_role overrules it from the server 1 GET
Open a non-Mergin project on_qgis_project_changed (else) cleared none
Plugin start / sign-in create_manager refresh_project_role 1 GET
Status dialog opened project_status the project_info response the dialog already fetches none
Sync with nothing to do sync_project metadata, refreshed by the client during project_status() none
Sync completed sync_project metadata, refreshed by the pull/push none
Project created create_project metadata just written from the server response none
Plugin unloaded unload cleared none
Any of the above while offline refresh_project_role swallows the error last synced value from the metadata stands none

@harminius
harminius requested a review from MarcelGeo September 23, 2026 11:12
@harminius
harminius merged commit 5b0a1e3 into master Sep 24, 2026
8 checks passed
@harminius
harminius deleted the feat/mm-project-role-global branch September 24, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant