mirror of
https://github.com/projekteuler/projekteuler.git
synced 2026-01-27 10:38:50 +01:00
Allow admins to directly set translations
This commit is contained in:
@@ -2,4 +2,9 @@ class ApplicationController < ActionController::Base
|
||||
# Prevent CSRF attacks by raising an exception.
|
||||
# For APIs, you may want to use :null_session instead.
|
||||
protect_from_forgery with: :exception
|
||||
|
||||
def authenticate_admin!
|
||||
authenticate_user!
|
||||
throw(:warden) unless current_user.admin?
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user