Fix Peg_content,Annoucement authorization bug

This commit is contained in:
Manson Wang 2013-11-12 19:09:29 +08:00
parent 3d091b692d
commit a1840c86de
2 changed files with 2 additions and 1 deletions

View File

@ -196,6 +196,7 @@ class ModuleApp
def update_auth_sub_manager_users def update_auth_sub_manager_users
user_ids = self.auth_sub_managers.inject([]) do |users, auth| user_ids = self.auth_sub_managers.inject([]) do |users, auth|
auth = auth.class.find(auth.id)
users += auth.authorized_users.map{|user| user.id} users += auth.authorized_users.map{|user| user.id}
end end
self.update_attribute(:auth_sub_manager_users, user_ids.uniq) self.update_attribute(:auth_sub_manager_users, user_ids.uniq)

View File

@ -3,7 +3,7 @@
quick_edit_link type: 'edit', quick_edit_link type: 'edit',
link: 'edit_panel_page_content_back_end_page_context_path' link: 'edit_panel_page_content_back_end_page_context_path'
quick_edit_link type: 'authorization', 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', field type: 'associated',
db_field: 'page', db_field: 'page',
model_field: 'path', model_field: 'path',