posts: remove rating, note, and status locks.
Remove the ability for users to lock ratings, note, and post statuses. Historically the majority of locked posts were from 10+ years ago when certain users habitually locked ratings and notes on every post they touched for no reason. Nowadays most posts have been unlocked. Only a handful of locked posts are left, none of which deserve to be locked. The is_rating_locked, is_note_locked, and is_status_locked columns still exist in the database, but aren't used.
This commit is contained in:
@@ -55,18 +55,6 @@ class PostPolicy < ApplicationPolicy
|
||||
record.visible?(user)
|
||||
end
|
||||
|
||||
def can_lock_rating?
|
||||
user.is_builder?
|
||||
end
|
||||
|
||||
def can_lock_notes?
|
||||
user.is_builder?
|
||||
end
|
||||
|
||||
def can_lock_status?
|
||||
user.is_admin?
|
||||
end
|
||||
|
||||
def can_use_mode_menu?
|
||||
user.is_gold?
|
||||
end
|
||||
@@ -84,9 +72,6 @@ class PostPolicy < ApplicationPolicy
|
||||
[
|
||||
:tag_string, :old_tag_string, :parent_id, :old_parent_id,
|
||||
:source, :old_source, :rating, :old_rating, :has_embedded_notes,
|
||||
(:is_rating_locked if can_lock_rating?),
|
||||
(:is_note_locked if can_lock_notes?),
|
||||
(:is_status_locked if can_lock_status?),
|
||||
].compact
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user