From c92601779021ff955eb5c06a315b258e6b10b61d Mon Sep 17 00:00:00 2001 From: efalcy <efalcy@afi-sa.fr> Date: Wed, 11 Apr 2018 10:12:56 +0200 Subject: [PATCH] dev #70388 : add acl for search form --- library/ZendAfi/Acl/AdminControllerRoles.php | 3 +++ library/ZendAfi/View/Helper/Admin/ContentNav.php | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/library/ZendAfi/Acl/AdminControllerRoles.php b/library/ZendAfi/Acl/AdminControllerRoles.php index d354ecd2b97..35cb1f24f8f 100644 --- a/library/ZendAfi/Acl/AdminControllerRoles.php +++ b/library/ZendAfi/Acl/AdminControllerRoles.php @@ -93,6 +93,7 @@ class ZendAfi_Acl_AdminControllerRoles extends Zend_Acl { $this->add(new Zend_Acl_Resource('systeme')); $this->add(new Zend_Acl_Resource('batch')); $this->add(new Zend_Acl_Resource('file-manager')); + $this->add(new Zend_Acl_Resource('search-form')); //Roles $this->addRole(new Zend_Acl_Role('invite')); @@ -146,6 +147,7 @@ class ZendAfi_Acl_AdminControllerRoles extends Zend_Acl { $this->allow('admin_bib','modo'); $this->allow('admin_bib','menus'); $this->allow('admin_bib','external-agendas'); + $this->allow('admin_bib','search-form'); $this->deny('modo_portail','catalogue'); $this->deny('modo_portail','rss'); @@ -165,6 +167,7 @@ class ZendAfi_Acl_AdminControllerRoles extends Zend_Acl { $this->deny('modo_portail','usergroup'); $this->deny('modo_portail','systeme'); $this->deny('modo_portail','batch'); + $this->deny('modo_portail','search-form'); $this->allow('modo_portail'); $this->allow('admin_portail'); diff --git a/library/ZendAfi/View/Helper/Admin/ContentNav.php b/library/ZendAfi/View/Helper/Admin/ContentNav.php index aff21ae596c..c7a7e258adc 100644 --- a/library/ZendAfi/View/Helper/Admin/ContentNav.php +++ b/library/ZendAfi/View/Helper/Admin/ContentNav.php @@ -129,7 +129,9 @@ class ZendAfi_View_Helper_Admin_ContentNav extends ZendAfi_View_Helper_BaseHelpe public function menuSysteme() { $is_admin = function($user) { return $user->isAdmin(); }; $is_super_admin = function($user) { return $user->isSuperAdmin(); }; - $advanced_search_form = function($user) { return Class_AdminVar::get('ADVANCED_SEARCH_CONFIGURABLE');}; + $advanced_search_form = function($user) { + return Class_AdminVar::get('ADVANCED_SEARCH_CONFIGURABLE'); + }; return $this ->renderBloc($this->_('Système'), [['cosmogramme', $this->_('Accès à Cosmogramme'), '/cosmogramme', -- GitLab