put add admin pages using orbit back end controller

This commit is contained in:
Fu Matthew authored and Matt K. Fu committed 2013-04-17 10:54:38 +08:00
1 parent 6cd97adf21
commit 8e98cb3ec9
12 files changed
+14 -34

No files matched your search

-24
View File
@@ -59,30 +59,6 @@ class ApplicationController < ActionController::Base
redirect_to root_path
end
# Check if the current_user is admin,if not redirect
def is_admin?
current_or_guest_user.admin? ? true : auth_failed_in_backend
end
# def is_manager?
# @module_app.is_manager?(current_or_guest_user) || is_admin?
# end
# # Check if the current_user is admin
# def is_member?
# if (current_user rescue false)
# return true
# end
# return false
# end
# def is_guest?
# if session[:guest_user_id]
# return true
# end
# return false
# end
def for_admin_only
if is_admin?
true