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

Implement access control for getUserById endpoint #33

Open
JHalvor opened this issue Oct 30, 2024 · 0 comments
Open

Implement access control for getUserById endpoint #33

JHalvor opened this issue Oct 30, 2024 · 0 comments

Comments

@JHalvor
Copy link

JHalvor commented Oct 30, 2024

  • Access to endpoint if logged-in user is owner or has teacher role
  • Else respond with '403 Forbidden - You do not have access etc..'

Steps

  1. Update middleware auth.js with function to check if teacher or owner
  2. Update routes to use new middleware function
  3. (Update controller, openapi.yml if necessary)
@tuvaea tuvaea changed the title Implement validation for getUserById endpoint to check if logged in user is owner or has teacher role. Implement access control for getUserById endpoint Oct 30, 2024
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

When branches are created from issues, their pull requests are automatically linked.

2 participants