mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-08 23:18:18 -07:00
more authentication
This commit is contained in:
parent
42fd3edbae
commit
615ee36fa1
7 changed files with 25 additions and 12 deletions
|
|
@ -1,3 +1,12 @@
|
|||
class ApplicationController < ActionController::Base
|
||||
protect_from_forgery with: :exception, prepend: true
|
||||
|
||||
|
||||
def verify_admin
|
||||
return true if current_user.admin?(@school)
|
||||
|
||||
redirect_to root_path, notice: 'You must be logged in as an admin of that school to access that page.'
|
||||
return false
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue