diff --git a/app/controllers/admin/object_auths_new_interface_controller.rb b/app/controllers/admin/object_auths_new_interface_controller.rb index ac06602a..3391fbc2 100644 --- a/app/controllers/admin/object_auths_new_interface_controller.rb +++ b/app/controllers/admin/object_auths_new_interface_controller.rb @@ -74,10 +74,15 @@ class Admin::ObjectAuthsNewInterfaceController < OrbitBackendController end def setup_vars - @app_title = request.env['HTTP_REFERER'].split('/')[4] - #@app_title = request.fullpath.split('/')[1] if(@app_title == "back_end") - @app_title.gsub!(/[?].*/,'') - @module_app = ModuleApp.first(conditions: {:key => @app_title} ) + if request.env['HTTP_REFERER'].split('/')[4] == "object_auths" + @app_key = params[:app_key] + else + @app_key = request.env['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} ) end end \ No newline at end of file diff --git a/app/views/admin/object_auths_new_interface/setting.html.erb b/app/views/admin/object_auths_new_interface/setting.html.erb index e66330c7..d3853c25 100644 --- a/app/views/admin/object_auths_new_interface/setting.html.erb +++ b/app/views/admin/object_auths_new_interface/setting.html.erb @@ -20,7 +20,7 @@ - <%= link_to t("admin.object_auth.list_title_of_users",:auth_title => @ob_auth.title), admin_object_auth_ob_auth_show_path , :class=>'preview_trigger btn btn-success pull-right'%> + <%= link_to t("admin.object_auth.list_title_of_users",:auth_title => @ob_auth.title), admin_object_auth_ob_auth_show_path(:app_key=>@module_app.key) , :class=>'preview_trigger btn btn-success pull-right'%> <%#= label_tag :role, t("admin.roles") %>