mirror of
https://github.com/projekteuler/projekteuler.git
synced 2026-01-27 02:28:50 +01:00
Use Omniauthable user model with admin role
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
class AdminController < ApplicationController
|
||||
before_action :authenticate_admin!
|
||||
before_action :authenticate!
|
||||
|
||||
def authenticate!
|
||||
authenticate_user!
|
||||
raise SecurityError unless current_user.admin?
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user