From a1840c86dee3f191a556696ccaddf8a3dcbb4fa4 Mon Sep 17 00:00:00 2001 From: Manson Wang Date: Tue, 12 Nov 2013 19:09:29 +0800 Subject: [PATCH] Fix Peg_content,Annoucement authorization bug --- app/models/module_app.rb | 1 + .../panel/page_content/back_end/page_contexts/index.html.erb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/module_app.rb b/app/models/module_app.rb index 006b8404..8218731b 100644 --- a/app/models/module_app.rb +++ b/app/models/module_app.rb @@ -196,6 +196,7 @@ class ModuleApp def update_auth_sub_manager_users user_ids = self.auth_sub_managers.inject([]) do |users, auth| + auth = auth.class.find(auth.id) users += auth.authorized_users.map{|user| user.id} end self.update_attribute(:auth_sub_manager_users, user_ids.uniq) diff --git a/vendor/built_in_modules/page_content/app/views/panel/page_content/back_end/page_contexts/index.html.erb b/vendor/built_in_modules/page_content/app/views/panel/page_content/back_end/page_contexts/index.html.erb index 9cece863..6499341b 100644 --- a/vendor/built_in_modules/page_content/app/views/panel/page_content/back_end/page_contexts/index.html.erb +++ b/vendor/built_in_modules/page_content/app/views/panel/page_content/back_end/page_contexts/index.html.erb @@ -3,7 +3,7 @@ quick_edit_link type: 'edit', link: 'edit_panel_page_content_back_end_page_context_path' quick_edit_link type: 'authorization', - link: "admin_authorizations_path(@module_app.key, 'page_context', object.id)" + link: "admin_authorizations_path(@module_app.key, 'page_context_authorization', object.id)" field type: 'associated', db_field: 'page', model_field: 'path',