users: remove no_flagging and no_feedback permissions.

This commit is contained in:
evazion
2019-12-24 10:24:15 -06:00
parent 939c168fe9
commit 7694be9cb3
8 changed files with 5 additions and 82 deletions

View File

@@ -1,6 +1,5 @@
class UserFeedbacksController < ApplicationController
before_action :gold_only, :only => [:new, :edit, :create, :update]
before_action :check_no_feedback, only: [:new, :edit, :create, :update]
respond_to :html, :xml, :json, :js
def new
@@ -42,12 +41,6 @@ class UserFeedbacksController < ApplicationController
raise User::PrivilegeError unless user_feedback.editable_by?(CurrentUser.user)
end
def check_no_feedback
if CurrentUser.no_feedback?
raise User::PrivilegeError
end
end
def user_feedback_params(context, user_feedback = nil)
permitted_params = %i[body category]
permitted_params += %i[user_id user_name] if context == :create