Manage publicities

This commit is contained in:
2017-04-14 11:34:01 +02:00
parent dd5e22ea48
commit 281caaf0fd
20 changed files with 176 additions and 19 deletions
@@ -1,5 +1,15 @@
module Admin
class ApplicationController < ::ApplicationController
http_basic_authenticate_with name: 'admin', password: ENV['ADMIN_PASSWORD'] unless Rails.env.development?
before_action :authenticate_supporter!
before_action :authenticate_admin!
def authenticate_admin!
return true if current_supporter.admin?
head(:forbidden)
end
def admin_area
true
end
end
end