before_action :authorize_web
before_action :set_locale
- before_action :require_user
+
+ authorize_resource
def new
if required_new_report_params_present?
def default_assigned_role
case issue_params[:reportable_type]
- when "Note" then "moderator"
- when "User" then case report_params[:category]
- when "vandal" then "moderator"
- else "administrator"
- end
- else "administrator"
+ when "Note"
+ "moderator"
+ when "User"
+ case report_params[:category]
+ when "vandal" then "moderator"
+ else "administrator"
+ end
+ else
+ "administrator"
end
end
end