Idea: accounts that have never had a post approved should not be able to add tags to locked wiki pages
Please describe the desired behavior.
I am interested in reducing spam on the website, in this case, "tag spam" created by users who have never had an approved post.
I would like to hear pros and cons on the following question: Should locked wiki pages be able to be tagged by anyone?
Additional context (optional)
As one of the website moderators, i was uncomfortable to see that the main financial page of the entire nonprofit (https://publiclab.org/donate) was tagged "skincare" by someone who had never posted before. Screenshot:

There is no notification about new tags being added, so how can moderators know when tag spam has been added to any page, much less to a locked page that should not be vulnerable to spam? To me, allowing unmoderated accounts who have never had an approved post be able to add tags seems like an oversight that we should stop allowing.
What do you think? Thanks!!! :D
Can I research on this ?
I agree with Liz on this. Unmoderated accounts should not be able to add tags.
To achieve this, we could wrap this entire method in a conditional:
https://github.com/publiclab/plots2/blob/3267de0b4872c07d2aaa6ab523d33e45e062cb33/app/models/node.rb#L758
Like:
def add_tag(tagname, user)
if user.status == 1
# rest of the method here
end
end
This would make for a nice FTO, although we should add a unit test for it too!
The unit test could be similar to this one;
https://github.com/publiclab/plots2/blob/3267de0b4872c07d2aaa6ab523d33e45e062cb33/test/unit/node_test.rb#L42-L52
test 'non-approved users should not be able to add tags' do
node = nodes(:one)
assert_difference 'node.tags.count', 0 do
node.add_tag('myspamtag', users(:spammer))
end
assert_not node.has_tag('myspamtag')
end
This has been marked as a good candidate for becoming a first-timers-only issue like these, meaning that it's simple, self-contained, and with some extra formatting, could be a great entry point for a new contributor. If you're familiar enough with this code, please consider reformatting or reposting it as a first-timers-only issue, and then ping @publiclab/reviewers to get it labelled. Or, if this is not your first time, try to solve it yourself!
Hey! I reformatted and made an fto for this issue at #7196. I tried to integrate a TDD logic to teach new contributors some interesting programming concepts. What do you think?
Moved to #7196
Thanks @Uzay-G 🎉