Skip to content

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

Description

@gabriel-bolbotina

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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions