Merge branch 'sidebar_config' into ntu

Conflicts:
	app/controllers/admin/object_auths_new_interface_controller.rb
	app/controllers/orbit_backend_controller.rb
	app/controllers/orbit_widget_controller.rb
	app/models/module_app.rb
	app/views/admin/page_parts/_module_widget.html.erb
	config/locales/zh_tw.yml
	lib/parsers/parser_common.rb
	lib/parsers/parser_front_end.rb
This commit is contained in:
Fu Matthew committed 2013-01-08 14:17:21 +08:00
commit 76296ab29b
160 files changed
+8659 -1037

No files matched your search

@@ -64,6 +64,7 @@ class Admin::ObjectAuthsNewInterfaceController < OrbitBackendController
def force_order
authenticate_user!
set_module_app
setup_vars
check_if_user_can_do_object_auth
end
@@ -80,15 +81,25 @@ class Admin::ObjectAuthsNewInterfaceController < OrbitBackendController
end
def setup_vars
if request.env['HTTP_REFERER'].split('/')[4] == "object_auths"
http_referer = request.env['HTTP_REFERER'] || ''
if http_referer.split('/')[4] == "object_auths"
@app_key = params[:app_key]
else
@app_key = request.env['HTTP_REFERER'].split('/')[4]
@app_key = http_referer.split('/')[4]
end
#@app_key = request.fullpath.split('/')[1] if(@app_key == "back_end")
@app_key.gsub!(/[?].*/,'')
@module_app = ModuleApp.first(conditions: {:key => @app_key} )
if @app_key
@app_key.gsub!(/[?].*/,'')
@module_app = ModuleApp.first(conditions: {:key => @app_key} )
if @module_app.nil?
raise ObjectAuthError, 'Auth procress failed, module_app not exist '
end
else
raise ObjectAuthError, 'Auth procress failed, pls redo your sop'
end
end
end