post_disapprovals/index: don't show usernames to other users.

* Don't show who disapproved the post to other users. Only show the
  creator to mods or to the disapprover themselves.
* Let unprivileged users see the /post_disapprovals index.
This commit is contained in:
evazion
2020-02-16 20:25:01 -06:00
parent ff8bfee9eb
commit 9ef80d7344
3 changed files with 16 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
class PostDisapprovalsController < ApplicationController
before_action :approver_only
before_action :approver_only, only: [:create]
skip_before_action :api_check
respond_to :js, :html, :json, :xml