Skip to content
This repository was archived by the owner on Sep 25, 2025. It is now read-only.

feat: require permission for (most of) sponsor dashboard - #1620

Merged
gikf merged 10 commits into
freeCodeCamp:mainfrom
ojeytonwilliams:feat/hide-sponsors
Sep 30, 2022
Merged

gikf merged 10 commits into
freeCodeCamp:mainfrom
ojeytonwilliams:feat/hide-sponsors

Conversation

@ojeytonwilliams

Copy link
Copy Markdown
Contributor
  • fix: make add sponsor button more explicit
  • feat(test): try to add sponsor when creating event
  • test: add more pages needing permission
  • refactor: rename permissions
  • feat: add chapter_administrator instance role
  • feat: require permission for sponsors dash
  • feat: protect dashboard/sponsor/[id]
  • I have read Chapter's contributing guidelines.
  • My pull request has a descriptive title (not a vague title like Update README.md).
  • My pull request targets the main branch of Chapter.

Ref: #1608

It's "most of" because the query resolver to get a sponsor is used both to provide data for /dashboard/sponsor/[id] and /dashboard/sponsor/[id]/edit, but an admin is allowed to view the first, but not the second.

The only fix I know of is to create yet another resolver, but I've left it for now.

@ojeytonwilliams ojeytonwilliams added UI/UX This issue deals with UI/UX API labels Sep 28, 2022
@ojeytonwilliams
ojeytonwilliams requested a review from a team September 28, 2022 13:21
@gitpod-io

gitpod-io Bot commented Sep 28, 2022

Copy link
Copy Markdown

@ghost

ghost commented Sep 28, 2022 •

Copy link
Copy Markdown
👇 Click on the image for a new way to code review
  • Make big changes easier — review code in small groups of related files

  • Know where to start — see the whole change at a glance

  • Take a code tour — explore the change with an interactive tour

  • Make comments and review — all fully sync’ed with github

    Try it now!

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map Legend

@gikf gikf left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Seems to be working as intended 👍

@gikf
gikf merged commit c421f8a into freeCodeCamp:main Sep 30, 2022
@ojeytonwilliams
ojeytonwilliams deleted the feat/hide-sponsors branch September 30, 2022 17:46
ojeytonwilliams added a commit to ojeytonwilliams/chapter that referenced this pull request Nov 16, 2022
freeCodeCamp#1620 added and modified permissions. Since this has to be reflected in
live databases, it should be a migration.

It's a weird migration because it does not modify the schema, it
modifies data. Something we may want to avoid in future (if possible)
@ojeytonwilliams ojeytonwilliams mentioned this pull request Nov 16, 2022
3 tasks done
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

API status: ready for review UI/UX This issue deals with UI/UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants