diff --git a/library/ZendAfi/Acl/AdminControllerRoles.php b/library/ZendAfi/Acl/AdminControllerRoles.php index 7bd00f57c00e106f1819c42ab37043d2be817d20..33833e2f13db3dae77f63ea9892b97d1f206d6b7 100644 --- a/library/ZendAfi/Acl/AdminControllerRoles.php +++ b/library/ZendAfi/Acl/AdminControllerRoles.php @@ -170,6 +170,7 @@ class ZendAfi_Acl_AdminControllerRoles extends Zend_Acl { $this->deny('modo_portail','systeme'); $this->deny('modo_portail','batch'); $this->deny('modo_portail','search-form'); + $this->deny('modo_portail','thesauri'); $this->allow('modo_portail'); $this->allow('admin_portail'); diff --git a/tests/application/modules/admin/controllers/AlbumControllerListViewModeTest.php b/tests/application/modules/admin/controllers/AlbumControllerListViewModeTest.php index 8db4fa93a6e3e518dd387164e5b4d9e48c2843f5..3ffd87a5d8bf81d6506185bc53e90b3f4d5488f2 100644 --- a/tests/application/modules/admin/controllers/AlbumControllerListViewModeTest.php +++ b/tests/application/modules/admin/controllers/AlbumControllerListViewModeTest.php @@ -166,13 +166,13 @@ class Admin_AlbumControllerListViewModeSearchTest extends Admin_AlbumControllerL $this->onLoaderOfModel('Class_Album') ->whenCalled('findAllBy') - ->with(['where' => 'titre like \'%Second%\'', + ->with(['where' => '(titre like \'%Second%\')', 'order' => 'titre', 'limitPage' => [0, 25]]) ->answers([Class_Album::find(2)]) ->whenCalled('countBy') - ->with(['where' => 'titre like \'%Second%\'', + ->with(['where' => '(titre like \'%Second%\')', 'order' => 'titre']) ->answers(200) @@ -333,13 +333,13 @@ class Admin_AlbumControllerListViewModeSearchSpecialCharTest extends Admin_Album Storm_Test_ObjectWrapper::onLoaderOfModel('Class_Album') ->whenCalled('findAllBy') - ->with(['where' => 'titre like \'%é%\'', + ->with(['where' => '(titre like \'%é%\')', 'order' => 'titre', 'limitPage' => [0, 25]]) ->answers([Class_Album::find(2)]) ->whenCalled('countBy') - ->with(['where' => 'titre like \'%é%\'', + ->with(['where' => '(titre like \'%é%\')', 'order' => 'titre']) ->answers(200) diff --git a/tests/library/ZendAfi/View/Helper/Admin/MenuGaucheAdminTest.php b/tests/library/ZendAfi/View/Helper/Admin/MenuGaucheAdminTest.php index 21797ec21f7856a13b0d1502f7677908def00dcd..67a1b6cb395e90ac19d6240d744dc6d3e1b367d2 100644 --- a/tests/library/ZendAfi/View/Helper/Admin/MenuGaucheAdminTest.php +++ b/tests/library/ZendAfi/View/Helper/Admin/MenuGaucheAdminTest.php @@ -327,6 +327,7 @@ Trait MenuGaucheAdminRolesDefinition { 'users', 'usergroup', 'file-manager', + 'thesauri/index', ] ], [ZendAfi_Acl_AdminControllerRoles::MODO_BIB, @@ -356,6 +357,7 @@ class ZendAfi_View_Helper_Admin_MenuGaucheAdminRightsTest extends ViewHelperTest Class_AdminVar::set('ACTIVITY', 1); Class_AdminVar::set('BIBNUM', 1); Class_AdminVar::set('SITO_IN_ALBUMS', 1); + Class_AdminVar::set('THESAURI_BROWSER', 1); } diff --git a/tests/scenarios/Thesauri/ThesauriTest.php b/tests/scenarios/Thesauri/ThesauriTest.php index d5504b53c845c16e18ede129dd67d0356044cb41..15e8fe96385be3270db38a4f4ec6e028aa3b9a4b 100644 --- a/tests/scenarios/Thesauri/ThesauriTest.php +++ b/tests/scenarios/Thesauri/ThesauriTest.php @@ -196,6 +196,15 @@ class Thesauri_ThesauriAdminIndexDispatchTest extends Thesauri_ThesauriTestCase public function setUp() { parent::setUp(); + + $user = $this->fixture('Class_Users', + ['id' => 65, + 'login' => 'admin', + 'password' => 'admin', + 'role_level' => ZendAfi_Acl_AdminControllerRoles::ADMIN_PORTAIL]); + + ZendAfi_Auth::getInstance()->logUser($user); + $this->dispatch('/admin/index', true); }