Skip to content

Prevent non-admin users from inserting a question"

What does this MR do?

  • Adds an admin field to the generated JWT.
  • Checks user is an admin to insert a question.

Relevant screenshots

(Add any relevant screenshots of MR's functionality)

Testing

  • After login/registering, check generated JWT contains admin field.
  • Attempt to insert a question with admin field set to false. Should return Forbidden.
  • Attempt to insert a question with admin field set to true. Should return OK.

Relevant issues

Closes #35 (closed)

Merge request reports