diff --git a/application/src/DBAL/Types/RightType.php b/application/src/DBAL/Types/RightType.php index 9a24ef4..ef5373f 100644 --- a/application/src/DBAL/Types/RightType.php +++ b/application/src/DBAL/Types/RightType.php @@ -1,25 +1,23 @@ 'administration', self::READ => 'read', - self::WRITE=>'write', + self::WRITE => 'write', ]; } - diff --git a/application/src/Entity/AbstractEntity.php b/application/src/Entity/AbstractEntity.php index 264de8a..9e2543e 100644 --- a/application/src/Entity/AbstractEntity.php +++ b/application/src/Entity/AbstractEntity.php @@ -1,24 +1,23 @@ node = new Node(); $this->node->setSource($this); } diff --git a/application/src/Entity/Attribut/BlacklistAttribut.php b/application/src/Entity/Attribut/BlacklistAttribut.php new file mode 100644 index 0000000..eafad7f --- /dev/null +++ b/application/src/Entity/Attribut/BlacklistAttribut.php @@ -0,0 +1,24 @@ +blacklist = $value; + } + + public function getBlacklist(): ?bool + { + return $this->blacklist; + } +} diff --git a/application/src/Entity/Attribut/BlacklistAttributInterface.php b/application/src/Entity/Attribut/BlacklistAttributInterface.php index 1f69928..1ca7497 100644 --- a/application/src/Entity/Attribut/BlacklistAttributInterface.php +++ b/application/src/Entity/Attribut/BlacklistAttributInterface.php @@ -1,10 +1,9 @@ law = $law; } - - public function getLaw(): LawInterface{ + + public function getLaw(): LawInterface + { return $this->law; } } - diff --git a/application/src/Entity/Attribut/LawAttributInterface.php b/application/src/Entity/Attribut/LawAttributInterface.php index 63d680d..3926b55 100644 --- a/application/src/Entity/Attribut/LawAttributInterface.php +++ b/application/src/Entity/Attribut/LawAttributInterface.php @@ -1,18 +1,15 @@ rights = $rights; } - - public function getRights():ArrayCollection{ + + public function getRights(): ArrayCollection + { return $this->rights; } } - diff --git a/application/src/Entity/Attribut/TypeAttribut.php b/application/src/Entity/Attribut/TypeAttribut.php index b4cb476..472490f 100644 --- a/application/src/Entity/Attribut/TypeAttribut.php +++ b/application/src/Entity/Attribut/TypeAttribut.php @@ -1,24 +1,24 @@ type = $type; } - - public function getType():string{ + + public function getType(): string + { return $this->type; } } - diff --git a/application/src/Entity/Attribut/TypeAttributInterface.php b/application/src/Entity/Attribut/TypeAttributInterface.php index 7418722..708ea9d 100644 --- a/application/src/Entity/Attribut/TypeAttributInterface.php +++ b/application/src/Entity/Attribut/TypeAttributInterface.php @@ -1,15 +1,13 @@ user = $user; } - - public function getUser():User{ + + public function getUser(): User + { return $this->user; } } - diff --git a/application/src/Entity/Attribut/UserAttributInterface.php b/application/src/Entity/Attribut/UserAttributInterface.php index 191d157..0731341 100644 --- a/application/src/Entity/Attribut/UserAttributInterface.php +++ b/application/src/Entity/Attribut/UserAttributInterface.php @@ -1,17 +1,15 @@ user = $userSource; } - - public function getUserSource():UserSourceInterface{ + + public function getUserSource(): UserSourceInterface + { return $this->userSource; } } - diff --git a/application/src/Entity/Attribut/UserSourceAttributInterface.php b/application/src/Entity/Attribut/UserSourceAttributInterface.php index 9133008..3d5da53 100644 --- a/application/src/Entity/Attribut/UserSourceAttributInterface.php +++ b/application/src/Entity/Attribut/UserSourceAttributInterface.php @@ -1,17 +1,15 @@ whitelist = $value; + } + + public function getWhitelist(): ?bool + { + return $this->whitelist; + } +} diff --git a/application/src/Entity/Attribut/WhitelistAttributInterface.php b/application/src/Entity/Attribut/WhitelistAttributInterface.php index f5f2dc4..787590f 100644 --- a/application/src/Entity/Attribut/WhitelistAttributInterface.php +++ b/application/src/Entity/Attribut/WhitelistAttributInterface.php @@ -1,15 +1,13 @@ initAllRights(); @@ -39,13 +40,11 @@ class Law extends AbstractEntity implements LawInterface private function initAllRights(): void { $this->rights = new ArrayCollection(); - foreach (RightType::getChoices() as $key=>$value){ + foreach (RightType::getChoices() as $key => $value) { $right = new Right(); $right->setType($value); $right->setLaw($this); $this->rights->set($key, $right); } } - } - diff --git a/application/src/Entity/LawInterface.php b/application/src/Entity/LawInterface.php index 0a119d6..1fb1975 100644 --- a/application/src/Entity/LawInterface.php +++ b/application/src/Entity/LawInterface.php @@ -1,15 +1,12 @@ law = new Law(); $this->law->setNode($this); } diff --git a/application/src/Entity/Permission.php b/application/src/Entity/Permission.php new file mode 100644 index 0000000..8d673cb --- /dev/null +++ b/application/src/Entity/Permission.php @@ -0,0 +1,31 @@ +