Initial commit

This commit is contained in:
Senad Uka
2020-05-31 22:38:19 +02:00
commit 858fafc3c5
1280 changed files with 65918 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
class Admin::ApplicationController < ActionController::Base
include Oath::ControllerHelpers # Methods for authentication
include Pundit # Methods for authorization
before_action :require_login
include SetCurrentRequestDetails
before_action :require_admin_login
after_action :verify_authorized, except: :index
after_action :verify_policy_scoped, only: :index
private
def require_admin_login
if !Current.user.admin?
redirect_to signed_in_root_url, alert: "You are not authorized to access this"
end
end
end