tags: remove tag category locks.

Remove the ability to lock a tag's category. Before a moderator could
lock a tag such that only an admin could change the tag's category.

Nowadays the ability to change a tag's category is based on the tag's
size. Members can change tag categories for tags with up to 50 posts,
and Builders can change categories for tags with up to 1000 posts.
Manually locking tags is not necessary.

We only had a few dozen locked tags, mostly random *_(cosplay) tags or
company name tags. Most of these are holdovers from moderators randomly
locking tags like ten years ago.

The `is_locked` field is still in the database, so it is still returned
by the /tags.json API, even though it is unused.
This commit is contained in:
evazion
2021-12-09 13:20:26 -06:00
parent a28078fdaa
commit 208b618918
5 changed files with 5 additions and 36 deletions

View File

@@ -98,20 +98,6 @@ class TagsControllerTest < ActionDispatch::IntegrationTest
assert_equal(Tag.categories.general, @tag.reload.category)
end
should "lock the tag for a moderator" do
put_auth tag_path(@tag), @mod, params: { tag: { is_locked: true } }
assert_redirected_to @tag
assert_equal(true, @tag.reload.is_locked)
end
should "not lock the tag for a user" do
put_auth tag_path(@tag), @user, params: {tag: { is_locked: true }}
assert_response 403
assert_equal(false, @tag.reload.is_locked)
end
context "for a tag with >50 posts" do
setup do
@tag.update(post_count: 100)