Skip to content

BOS-83: implemented auth#137

Open
Ryaken-Nakamoto wants to merge 2 commits intomainfrom
83-final-try-for-auth
Open

BOS-83: implemented auth#137
Ryaken-Nakamoto wants to merge 2 commits intomainfrom
83-final-try-for-auth

Conversation

@Ryaken-Nakamoto
Copy link
Copy Markdown

@Ryaken-Nakamoto Ryaken-Nakamoto commented Apr 1, 2026

ℹ️ Issue

Closes #83

📝 Description

Implemented authentication orchestration for 3 flows

  1. JWT Guard
  2. UserStatus guard (admin/volunteer)
  3. OmchaiGuard (project specific)

Added 2 new endpoints to:

  1. Create anthology
  2. Edit anthology fields

Note that the omchai guard will always look for :id or :anthologyId as a Param. If it does not exist then the guard will not be able to extract the anthologyId. Furthermore, from the previous version of the ticket I thought it would be helpful to make the publishedDate field on Anthology to be nullable because an anthology is not necessarily published upon being created.

✔️ Verification

  1. Created unit tests for each guard, and new service methods
  2. Ran manual integration tests for guards when logged in with incorrect roles, logged in with correct roles, and not logged in.

🏕️ (Optional) Future Work / Notes

package.json was edited, currently you have to manually change the name you want the migration to be, so a quick fix is needed for that.

Fixed some outdated units tests not associated with this ticket for UsersService, yarn test works now.

During integration testing I found that the mock data didn't include all the fields I needed to test. The Guards depend on accessing ids through the string literal column "user", instead of "userId". I'm interested to take on a new ticket to flesh out mock data/seeding for ease of testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

User Authentification

2 participants