Skip to content

Map stays blank if user has no permissions on default theme #12

@olivierdalang

Description

@olivierdalang

Hey ! Not 100% this is the right repo to report this issue...

In our setup, there is no default theme that every user has access to (we run qwc-map-viewer with AUTH_REQUIRED: "true"). This leads to the map staying blank on startup for all users except for the user that happens to have access to the first theme.

In such case, it would be better to fall back to the first project that user has access to.

See themes.json below, as served by qwc-map-viewer below, where you can see that the default theme isn't listed in the available themes. Note that the input configuration is generated by the config generator, which seems to assume the first project as default (never specified that manually). Arguably the config generator shouldn't add the "defaultTheme" property, and QWC should use the first theme if no "defaultTheme" is set.

Thanks !!

{
  "themes": {
    ...
    "defaultTheme": "scan/client_a",
    ...
    "items": [
      {
        ...
        "id": "scan/client_b",
        ...
      }
    ],
    ...
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions