1
0
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:
2019-02-23 13:49:25 +01:00
parent 1c2a73ba54
commit d56f0bf587
6 changed files with 49 additions and 8 deletions

View File

@@ -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