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

fixes permissions for non-superadmins in device tab #7711

Conversation

sairina
Copy link
Contributor

@sairina sairina commented Nov 25, 2020

Summary

Added additional logic to check whether user is a super-admin so that "info" and "settings" tabs are visible/disabled in Device:

  • If user is super-admin, they can see those tabs.
  • If user can "manage content" but is not a super-admin, they cannot see those tabs

Steps taken to check:

  • Made a learner account and gave the learner "can manage content" permission.
  • Logged in as learner to see if those two tabs were visible.
  • Checked other accounts that could/could not manage content to see if changes worked.

Screenshot
Learner with "can manage" permissions can no longer see the "info" and "settings" tabs.

Screen Shot 2020-11-25 at 2 54 32 PM

Reviewer guidance

Please test different user accounts with different permissions (can manage, coach, super-admin, etc.)

References

Fixes #6650


Contributor Checklist

PR process:

  • PR has the correct target branch and milestone
  • PR has 'needs review' or 'work-in-progress' label
  • If PR is ready for review, a reviewer has been added. (Don't use 'Assignees')

Testing:

  • Contributor has fully tested the PR manually
  • If there are any front-end changes, before/after screenshots are included

Reviewer Checklist

  • Automated test coverage is satisfactory
  • PR is fully functional
  • PR has been tested for accessibility regressions
  • External dependency files were updated if necessary (yarn and pip)
  • Documentation is updated
  • Contributor is in AUTHORS.md

@codecov
Copy link

codecov bot commented Nov 26, 2020

@sairina sairina requested a review from jonboiser November 30, 2020 17:09
@jonboiser jonboiser self-assigned this Dec 1, 2020
@jonboiser jonboiser added this to the 0.14.5 milestone Dec 1, 2020
@jonboiser jonboiser added the changelog Important user-facing changes label Dec 1, 2020
Copy link
Contributor

@jonboiser jonboiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@jonboiser jonboiser modified the milestones: 0.14.6, 0.14.5 Dec 1, 2020
@jonboiser jonboiser merged commit dd860a4 into learningequality:release-v0.14.x Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog Important user-facing changes
Projects
None yet
2 participants