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

Set up permissions for verify and unverify and UI for unverify #34

Merged
merged 3 commits into from
Oct 10, 2024

Conversation

KesterTan
Copy link

@KesterTan KesterTan commented Oct 10, 2024

Description

Previously, any user could verify/unverify a post which would make the feature useless since a student could just verify their own post. This PR would ensure that only certain individuals are able to verify the post and that students would be unable to do so. This goes beyond just frontend logic but also protects backend API calls so that students would not be able to verify their own post by sending a CURL request.

This PR does the following:

  • Adds UI for an unverified post.

Screenshot 2024-10-10 at 3 22 26 PM

  • Adds permissions such that only administrators and mods can verify/unverify a post.
  • Adds details about the verify message feature in the user guide in README.md

With this PR, the verify message feature can now allow only admins/mods to verify a message and the change will be propagated in both the frontend and backend (saved as a variable in the post struct). Resolves #21 and #33.

Testing

Automated unit tests for permissions have been added and lint checks are also tested.

@KesterTan KesterTan added the Message verified function These issues relate to the ability to mark messages as verified. label Oct 10, 2024
@KesterTan KesterTan added this to the Sprint 2 milestone Oct 10, 2024
@KesterTan KesterTan self-assigned this Oct 10, 2024
@coveralls
Copy link

Pull Request Test Coverage Report for Build 11281935619

Details

  • 8 of 8 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.007%) to 82.639%

Totals Coverage Status
Change from base Build 11280055495: 0.007%
Covered Lines: 22375
Relevant Lines: 25653

💛 - Coveralls

@katcday
Copy link

katcday commented Oct 10, 2024

Good style and test cases look thorough! LGTM!

@KesterTan KesterTan merged commit df3ac08 into f24 Oct 10, 2024
1 check passed
@philliparaujo philliparaujo deleted the unverify-message branch November 15, 2024 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Message verified function These issues relate to the ability to mark messages as verified.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add backend and frontend logic to a verified post to mark it is unverified
3 participants