Add an AdminController base class for Admin controllers
Handles stuff that's shared across admin controllers.
This commit is contained in:
parent
83f24de352
commit
925183ed7a
9 changed files with 27 additions and 44 deletions
|
@ -84,10 +84,6 @@ class ApplicationController < ActionController::Base
|
|||
abilities << Ability
|
||||
end
|
||||
|
||||
def authenticate_admin!
|
||||
return render_404 unless current_user.is_admin?
|
||||
end
|
||||
|
||||
def authorize_project!(action)
|
||||
return access_denied! unless can?(current_user, action, project)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue