docbrown/app/controllers/badges_controller.rb
Andy Zhao cd9f6d9ada [Done] Add BDEFGI Policies and Specs (#487)
* Add comment for public controllers

* Add block policy and specs

* Add policy for authorizing dashboard

* Add follow policy and specs

* Refactor a tiny bit

* Prevent banned users from following anything

* Add a note for email sub controller about auth

* Add image upload policies

* Add policy for github repos

* Fix typo and use correct github repo variable

* Fix image uploader and use regular params

* Add authenticate_user before action back in

* Rename test

* Update slack bot message formatting and fix reported URL
2018-06-26 09:23:07 -04:00

9 lines
285 B
Ruby

class BadgesController < ApplicationController
before_action :set_cache_control_headers, only: [:show]
# No authorization required for entirely public controller
def show
@badge = Badge.find_by_slug(params[:slug])
set_surrogate_key_header "badges-show-action"
end
end