Skip to content

Commit 7a88232

Browse files
AdrienClairembaulttrasher
authored andcommitted
Fix service catalog entity restrictions
1 parent cf88aaa commit 7a88232

File tree

4 files changed

+204
-71
lines changed

4 files changed

+204
-71
lines changed

phpunit/abstracts/SortStrategyTestCase.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434

3535
namespace tests\units\Glpi\Form;
3636

37+
use Glpi\Form\AccessControl\FormAccessParameters;
3738
use Glpi\Form\Category;
3839
use Glpi\Form\ServiceCatalog\ItemRequest;
3940
use Glpi\Form\ServiceCatalog\ServiceCatalogManager;
@@ -42,6 +43,7 @@
4243
use Glpi\Tests\FormTesterTrait;
4344
use KnowbaseItem;
4445
use Override;
46+
use Session;
4547

4648
abstract class SortStrategyTestCase extends \DbTestCase
4749
{
@@ -84,9 +86,10 @@ public function testSort(): void
8486
$this->populateServiceCatalog();
8587

8688
// Get the service catalog items
87-
$access_parameters = $this->getDefaultParametersForTestUser();
8889
$item_request = new ItemRequest(
89-
access_parameters: $access_parameters,
90+
access_parameters: new FormAccessParameters(
91+
Session::getCurrentSessionInfo()
92+
),
9093
items_per_page: 100,
9194
sort_strategy: SortStrategyEnum::ALPHABETICAL,
9295
);

0 commit comments

Comments
 (0)