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

@@ -1,4 +1,4 @@
class Admin::AppAuthsController < ApplicationController
class Admin::AppAuthsController < OrbitBackendController
layout "admin"
before_filter :authenticate_user!
# before_filter :is_admin? ,:only => :index
+1 -1
View File
@@ -1,4 +1,4 @@
class Admin::InfosController < ApplicationController
class Admin::InfosController < OrbitBackendController
layout "new_admin"
before_filter :authenticate_user!
+1 -1
View File
@@ -1,4 +1,4 @@
class Admin::ItemsController < ApplicationController
class Admin::ItemsController < OrbitBackendController
layout "site_editor"
@@ -1,4 +1,4 @@
class Admin::MemberSelectsController < ApplicationController
class Admin::MemberSelectsController < OrbitBackendController
layout "new_admin"
@@ -1,4 +1,4 @@
class Admin::ModuleAppsController < ApplicationController
class Admin::ModuleAppsController < OrbitBackendController
before_filter :user_has_manager_privilege?, :only => [ :assign_manager, :remove_manager ]
before_filter :user_has_sub_manager_privilege?, :only => [ :assign_sub_manager, :remove_sub_manager ]
@@ -1,4 +1,4 @@
class Admin::ObjectAuthsController < ApplicationController
class Admin::ObjectAuthsController < OrbitBackendController
include OrbitCoreLib::PermissionUtility
layout "new_admin"
before_filter :force_order
@@ -1,4 +1,4 @@
class Admin::PagePartsController < ApplicationController
class Admin::PagePartsController < OrbitBackendController
layout "site_editor"
@@ -1,4 +1,4 @@
class Admin::PurchasesController < ApplicationController
class Admin::PurchasesController < OrbitBackendController
require "net/http"
require "uri"
require 'zip/zip'
+1 -1
View File
@@ -1,4 +1,4 @@
class Admin::RolesController < ApplicationController
class Admin::RolesController < OrbitBackendController
layout "new_admin"
before_filter :authenticate_user!
+1 -1
View File
@@ -1,4 +1,4 @@
class Admin::SitesController < ApplicationController
class Admin::SitesController < OrbitBackendController
layout "new_admin"
before_filter :authenticate_user!
-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