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

Admin control, user security #76

Merged
merged 10 commits into from
Jan 10, 2021
Merged

Admin control, user security #76

merged 10 commits into from
Jan 10, 2021

Conversation

Noam-Bendelac
Copy link
Collaborator

Add /admin/load-ids endpoint, keep track of users in DB, and guard playlist endpoints against unauthorized users.

Close #57
Close #58
Close #74

Move db to separate file so it can be imported from multiple modules

Tested /admin like so:
```
$ source .env
$ curl -b admin_key=wrong_key localhost:3000/admin/test
Forbidden
$ curl -b admin_key=$ADMIN_KEY localhost:3000/admin/test
OK
```
Doesn't update the DB yet, just parses the file.
Resolve #57, add db collection described in #58
Frontend currently doesn't work with these changes
Respond 404 if the playlist doesn't exist or user is not allowed to see
playlist.

Add res.locals type checking.
@Noam-Bendelac Noam-Bendelac added this to the Milestone 1 milestone Jan 10, 2021
@Noam-Bendelac Noam-Bendelac changed the title Develop Admin control, user security Jan 10, 2021
@Noam-Bendelac Noam-Bendelac merged commit e45c5c6 into prime Jan 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant