Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(front): view mode based on permissions [MARXAN-1295] #903

Merged
merged 42 commits into from
Mar 23, 2022

Conversation

anamontiaga
Copy link
Collaborator

@anamontiaga anamontiaga commented Mar 14, 2022

View mode based on permissions

Overview

This PR contains:

  • New hooks folder for permissions with calls to set user access to the view depending on their role (viewer contributor and owner) and if the scenario is locked.
  • A view has been implemented for cases where the user cannot edit content (when the stage is locked, when the user is a viewer or in some cases where the user is a contributor).

Designs

At the moment we don't have designs for the viewer mode, it's made without being based on designs.

Testing instructions

To test, please consult Role Based Access Control table and check project_viewer, project_contributor and project_owner roles.

Keep in mind that the rest of the roles will be implemented in the future.

In addition, to test the functionality, it is essential to open two different user profiles to be able to verify that the user who is editing can access all the functionalities, and the user who is trying to access the same scenario and is locked, cannot edit.

Feature relevant tickets

MARXAN-1295

@vercel
Copy link

vercel bot commented Mar 14, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

marxan – ./app

🔍 Inspect: https://vercel.com/vizzuality1/marxan/BQavzWhKBWvSXPqnu6qSk6UqdqQN
✅ Preview: https://marxan-git-feat-frontmarxan-1295-view-mode-vizzuality1.vercel.app

marxan-storybook – ./app

🔍 Inspect: https://vercel.com/vizzuality1/marxan-storybook/9cNa8jH2SNeFSpbtbdynqGB5jda2
✅ Preview: https://marxan-storybook-git-feat-frontmarxan-1295-v-2d6a11-vizzuality1.vercel.app

@anamontiaga anamontiaga added Frontend Everything related frontend WIP Work in progress labels Mar 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Frontend Everything related frontend Ready to review PR ready to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants