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

Added authorization requirements for posting and deleting reports #413

Merged
merged 4 commits into from
Feb 2, 2024

Conversation

timobraz
Copy link
Contributor

@timobraz timobraz commented Feb 1, 2024

Description

if passport doesn't exist or no admin value on passport then you fail to access GET or DELETE routes. Still works if you're authenticated and admin status.

Screenshots

Screenshot 2024-01-31 at 6 00 51 PM

Steps to verify/test this change:

  • Verify changes work as expected on staging instance

Final Checks:

  • Verify successful deployment

(optional)

  • Write tests
  • Write documentation

Issues

Closes #397

@timobraz timobraz requested a review from js0mmer February 1, 2024 02:04
@timobraz timobraz self-assigned this Feb 1, 2024
Copy link
Member

@js0mmer js0mmer left a comment

Choose a reason for hiding this comment

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

LGTM! Just left comments on a couple typos that don't really matter

api/src/controllers/reports.ts Show resolved Hide resolved
api/src/controllers/reports.ts Show resolved Hide resolved
Copy link

github-actions bot commented Feb 2, 2024

Deployed staging instance to https://staging-413.peterportal.org

@timobraz timobraz merged commit 0db11e0 into master Feb 2, 2024
3 checks passed
@timobraz timobraz deleted the tim/authorized-report-routes branch February 2, 2024 01:31
js0mmer pushed a commit that referenced this pull request Feb 13, 2024
* feat:added authorization requirements for posting and deleting reports

* fix: linting use
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add authentication/admin checks to report api routes
2 participants