2017-03-28 00:06:53 +02:00
|
|
|
module Admin
|
2017-03-28 00:25:41 +02:00
|
|
|
class ApplicationController < ::ApplicationController
|
2017-04-14 11:34:01 +02:00
|
|
|
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
|
2017-03-28 00:06:53 +02:00
|
|
|
end
|
2016-04-18 08:45:50 +02:00
|
|
|
end
|