Skip to content

Permissions Error when trying to switch contexts. Can the dropdown be hidden per user group? #138

Open

Description

@pmacswebteam

Summary

When logging in as a publisher who only has access to a specific context, the "Choose Context" dropdown remains visible, but throws an error when trying to use it (see screenshot)
screen shot 2017-10-19 at 10 48 58 am

Also noticed, when logged in as a member of this same Publisher Group, my updates to the configurations are not being reflected.

Step to reproduce

  1. Login as publisher
  2. Go to Extras > Configuration
  3. Click the "Choose Context" dropdown

Observed behavior

See screenshot above.

Expected behavior

The error makes sense, since the user does not have permission to access other contexts, but can this option be hidden from specific user groups/users altogether, so that they can never click on the dropdown and see the error?

Environment

ClientConfig 2.0.0, MODX 2.5.7, macOS Sierra

Activity

  1. sebastian-marinescu commented on May 22, 2018

    @sebastian-marinescu
    Contributor

    Sounds reasonable. So either the user should only be able to switch through contexts he has permissions for, or either if it's a restricted user, then don't show the dropdown altogether – are these considerable solutions?

  2. Mark-H commented on Jun 26, 2018

    @Mark-H
    Member

    Hm, I would expect in this case the context selector to still work, and be shown, but to only show the one context they have access to.

    Can you check if your user has view_context permission?

  3. sebastian-marinescu commented on Jan 26, 2019

    @sebastian-marinescu
    Contributor

    Just stumbled upon something maybe related, wanted to note it here:

    For correct context-access (listing) the user-group needs a "AdministratorTemplate" with view_context here. I thought a "ContextTemplate"-access-policy with view there should be efficient, but it's not.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions