Skip to content

[INTW26] Implement reviewer authorization#108

Merged
gavxue merged 4 commits intomainfrom
INTW26-reviewer-authorization
Feb 7, 2026
Merged

[INTW26] Implement reviewer authorization#108
gavxue merged 4 commits intomainfrom
INTW26-reviewer-authorization

Conversation

@gavxue
Copy link
Collaborator

@gavxue gavxue commented Feb 3, 2026

Notion ticket link

Implement reviewer authorization

Implementation description

  • created isAuthorizedReviewer interface and implementation
  • also add appropriate types and graphql resolver

Steps to test

  1. sign in with Google OAuth on the frontend (localhost:3000/admin)
  2. use inspect tool and go to the Application tab
  3. under local storage, copy the corresponding value of the key accessToken
  4. test the following graphql query
query {
  isAuthorizedReviewer(
    accessToken: <YOUR_ACCESS_TOKEN>,
    applicantRecordId: <APPLICANT_RECORD_ID>
  )
}

Use the access token you copied previously. You can get applicant record ids by going to the reviewed_applicant_records table in the database. You can also check your id in the users table
5. test that the query returns true if you have a valid accessToken, valid applicantRecordId, and are actually assigned to review that applicant
6. test that the query returns false for any other scenario

What should reviewers focus on?

  • checking if implementation of the function makes sense

Checklist

  • My PR name is descriptive and in imperative tense
  • My commit messages are descriptive and in imperative tense. My commits are atomic and trivial commits are squashed or fixup'd into non-trivial commits
  • I have run the appropriate linter(s)
  • I have requested a review from the PL, as well as other devs who have background knowledge on this PR or who will be building on top of this PR

@gavxue gavxue self-assigned this Feb 3, 2026
@gavxue gavxue marked this pull request as ready for review February 4, 2026 02:10
@gavxue gavxue requested a review from mxc-maggiechen February 4, 2026 02:10
Copy link
Contributor

@mxc-maggiechen mxc-maggiechen left a comment

Choose a reason for hiding this comment

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

LGTM! Works great 😄

@mxc-maggiechen mxc-maggiechen requested a review from chene0 February 7, 2026 22:28
Copy link
Collaborator

@SaqAsh SaqAsh left a comment

Choose a reason for hiding this comment

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

Couldn't find anything to nit :) LGTM

Copy link
Contributor

@chene0 chene0 left a comment

Choose a reason for hiding this comment

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

LGTM

@gavxue gavxue merged commit e25f572 into main Feb 7, 2026
1 check passed
@gavxue gavxue deleted the INTW26-reviewer-authorization branch February 7, 2026 23:55
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.

4 participants