Class: Editor::ApplicationController

Inherits:
ApplicationController show all
Defined in:
app/controllers/editor/application_controller.rb

Overview

This controller contain the methods shared for all editor controller

Instance Method Summary collapse

Methods inherited from ApplicationController

#access_denied!, #default_url_options, #record_not_found!, #set_turbo, #switch_locale

Instance Method Details

#authenticate_editor!Object (private)

deny access unless current_user is an editor



11
12
13
# File 'app/controllers/editor/application_controller.rb', line 11

def authenticate_editor!
  access_denied! unless user_signed_in? && (current_user.editor? || current_user.admin?)
end