ritstudentgovernment / PawPrints

PawPrints petition application for the RIT community.
https://pawprints.rit.edu
Apache License 2.0
14 stars 14 forks source link

PAW-40 - Admin staff permissions #116

Closed lukasyelle closed 4 years ago

lukasyelle commented 4 years ago

Ticket

The purpose of this PR is to restrict what administrators have the ability (theoretically) to do with petitions. As it stands currently, the backend would allow an administrator to modify the title, description, and tags for a given petition. This issue as not been abused, as the frontend doesn't make this an easy thing to do, but it is possible. This PR changes that. Only the petition's author will now be able to modify its' contents, and administrators will not have that ability.

Tests needed to be updated, because as they were written, they were using a super user to make updates to the petitions, and checking also that they had the ability to do so. With that said, no additional tests need to be created.

codecov[bot] commented 4 years ago

Codecov Report

Merging #116 into develop will decrease coverage by 0.06%. The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #116      +/-   ##
===========================================
- Coverage    86.86%   86.80%   -0.07%     
===========================================
  Files           26       26              
  Lines         1431     1432       +1     
===========================================
  Hits          1243     1243              
- Misses         188      189       +1     

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3107a40...9bd6da5. Read the comment docs.