Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
fix(sec): check properly api configuration access (#9614)
Browse files Browse the repository at this point in the history
Refs: MON-6893
Fixes #9597
  • Loading branch information
kduret committed Apr 1, 2021
1 parent ae8fde4 commit f337c91
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Centreon/Domain/Contact/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -409,11 +409,13 @@ public function hasAccessToApiConfiguration(): bool
public function setAccessToApiConfiguration(bool $hasAccessToApiConfiguration): self
{
$this->hasAccessToApiConfiguration = $hasAccessToApiConfiguration;
if ($this->hasAccessToApiRealTime) {

if ($this->hasAccessToApiConfiguration) {
$this->addRole(self::ROLE_API_CONFIGURATION);
} else {
$this->removeRole(self::ROLE_API_CONFIGURATION);
}

return $this;
}

Expand Down

0 comments on commit f337c91

Please sign in to comment.