docbrown/app/controllers/internal/application_controller.rb
Mac Siri d976eb7ab6 Create InternalPolicy (#4380)
* Ensure verify_authorized in internal

* Create internal_policy

* Replace ArticlePolicy usage with InternalPolicy

* Replace BufferUpdate&CommentPolicy with InternalPolicy

* Remove verbose authorize_admin

* Forgot to remove coresponding specs

* Create specs for InternalPolicy

* Expand policy access on internal's broadcast

* Refactor

* Create shared spec

* Create request specs

* Add additional test cases
2019-10-17 14:21:43 -04:00

10 lines
205 B
Ruby

class Internal::ApplicationController < ApplicationController
before_action :authorize_admin
after_action :verify_authorized
private
def authorize_admin
authorize :admin, :minimal?
end
end