This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
2012-02-15 10:20:44 +00:00
|
|
|
class OrbitBackendController< ApplicationController
|
2012-03-20 06:17:28 +00:00
|
|
|
before_filter :force_order,:except => [:public]
|
2012-02-15 10:20:44 +00:00
|
|
|
before_filter :setup_vars
|
|
|
|
# before_filter {|c| c.front_end_available(@app_title)}
|
2012-03-20 06:17:28 +00:00
|
|
|
# before_filter :check_user_can_use
|
2012-02-15 10:20:44 +00:00
|
|
|
include OrbitCoreLib::PermissionUnility
|
2012-03-16 03:09:44 +00:00
|
|
|
include AdminHelper
|
2012-02-15 10:20:44 +00:00
|
|
|
|
|
|
|
layout 'admin'
|
|
|
|
|
|
|
|
def setup_vars
|
|
|
|
@app_title = request.fullpath.split('/')[2]
|
|
|
|
@module_app = ModuleApp.first(conditions: {:key => @app_title} )
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
2012-03-20 06:17:28 +00:00
|
|
|
def force_order
|
|
|
|
authenticate_user!
|
|
|
|
check_user_can_use
|
|
|
|
end
|
|
|
|
|
2012-02-15 10:20:44 +00:00
|
|
|
def check_user_can_use
|
|
|
|
unless check_permission
|
|
|
|
redirect_to polymorphic_path(['panel',@app_title,'back_end','public'])
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|