FEATURE: Staff members can lock posts

Locking a post prevents it from being edited. This is useful if the user
has posted something which has been edited out, and the staff members don't
want them to be able to edit it back in again.
This commit is contained in:
Robin Ward
2018-01-25 15:38:40 -05:00
parent 76317957ed
commit 6b04967e2f
19 changed files with 218 additions and 5 deletions

View File

@@ -63,7 +63,9 @@ class UserHistory < ActiveRecord::Base
backup_download: 45,
backup_destroy: 46,
notified_about_get_a_room: 47,
change_name: 48)
change_name: 48,
post_locked: 49,
post_unlocked: 50)
end
# Staff actions is a subset of all actions, used to audit actions taken by staff users.
@@ -104,7 +106,9 @@ class UserHistory < ActiveRecord::Base
:activate_user,
:change_readonly_mode,
:backup_download,
:backup_destroy]
:backup_destroy,
:post_locked,
:post_unlocked]
end
def self.staff_action_ids