Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [UNRELEASED]

### Changed

- Make the plugin compatible with the Content Security Policy

### Fixed

- Fix hidden question not available in anonymous forms
Expand Down
1 change: 1 addition & 0 deletions setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ function plugin_version_advancedforms(): array
'author' => '<a href="http://www.teclib.com">Teclib\'</a>',
'license' => '',
'homepage' => '',
'csp_compliant' => true,
'requirements' => [
'glpi' => [
'min' => PLUGIN_ADVANCEDFORMS_MIN_GLPI_VERSION,
Expand Down
11 changes: 5 additions & 6 deletions tests/Front/ConfigFormTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,13 @@ public function testTabHasContentExistOnConfigPageForAdmin(): void
$this->assertCount(1, $config_header);
}

public function testTabContentIsEmptyForTech(): void
public function testTabContentIsDeniedForTech(): void
{
// Act: go to the advanced form tab on the config
$this->login('tech');
$crawler = $this->get("/ajax/common.tabs.php", $this->getConfigTabUrlParams());
$this->expectException(AccessDeniedHttpException::class);

// Assert: no html was rendered as we lack rights to view config
$this->assertEmpty($crawler);
// Act: go to the advanced form tab on the config as technician
$this->login('tech');
$this->get("/ajax/common.tabs.php", $this->getConfigTabUrlParams());
}

#[DataProvider('provideQuestionTypes')]
Expand Down
Loading