Tag creator can't delete own powertags -- needs test written #826
Labels
help wanted
requires help by anyone willing to contribute
Ruby
testing
issues are usually for adding unit tests, integration tests or any other tests for a feature
Katie made a tag
activity:coqui
on this page: https://publiclab.org/notes/donblair/01-14-2015/riffle-coqui-development-planbut couldn't delete it herself. she's not a mod or admin. So I it looks like the permission check is OK:
https://github.com/publiclab/plots2/blob/master/app/controllers/tag_controller.rb#L148
if node_tag.uid == current_user.uid || current_user.role == "admin" || current_user.role == "moderator"
But we don't test this out, so we should add a test here: https://github.com/publiclab/plots2/blob/master/test/functional/tag_controller_test.rb
This could be a good starting draft:
The text was updated successfully, but these errors were encountered: