From f66cb4a8cee8690c0f2c07861598c71663d8f7e7 Mon Sep 17 00:00:00 2001 From: Kevin Frantz Date: Fri, 14 Sep 2018 13:33:56 +0200 Subject: [PATCH] Substituted whitelist and blacklist attribute trough grant attribute --- .../src/Entity/Attribut/GrantAttribut.php | 24 +++++++++++++++++++ .../Attribut/GrantAttributInterface.php | 13 ++++++++++ application/src/Entity/Permission.php | 17 ++++--------- .../src/Entity/PermissionInterface.php | 5 ++-- 4 files changed, 43 insertions(+), 16 deletions(-) create mode 100644 application/src/Entity/Attribut/GrantAttribut.php create mode 100644 application/src/Entity/Attribut/GrantAttributInterface.php diff --git a/application/src/Entity/Attribut/GrantAttribut.php b/application/src/Entity/Attribut/GrantAttribut.php new file mode 100644 index 0000000..d052ae3 --- /dev/null +++ b/application/src/Entity/Attribut/GrantAttribut.php @@ -0,0 +1,24 @@ +grant = $grant; + } + + public function getGrant(): bool + { + return $this->grant; + } +} diff --git a/application/src/Entity/Attribut/GrantAttributInterface.php b/application/src/Entity/Attribut/GrantAttributInterface.php new file mode 100644 index 0000000..ecb8679 --- /dev/null +++ b/application/src/Entity/Attribut/GrantAttributInterface.php @@ -0,0 +1,13 @@ +blacklist = false; - $this->whitelist = false; + $this->grant = true; } } diff --git a/application/src/Entity/PermissionInterface.php b/application/src/Entity/PermissionInterface.php index 81ac55f..0818bad 100644 --- a/application/src/Entity/PermissionInterface.php +++ b/application/src/Entity/PermissionInterface.php @@ -2,15 +2,14 @@ namespace App\Entity; -use App\Entity\Attribut\BlacklistAttributInterface; -use App\Entity\Attribut\WhitelistAttributInterface; use App\Entity\Attribut\NodeAttributInterface; use App\Entity\Attribut\RightAttributInterface; use App\Entity\Attribut\RecieverAttributInterface; +use App\Entity\Attribut\GrantAttributInterface; /** * @author kevinfrantz */ -interface PermissionInterface extends BlacklistAttributInterface, WhitelistAttributInterface, NodeAttributInterface, RightAttributInterface, RecieverAttributInterface +interface PermissionInterface extends NodeAttributInterface, RightAttributInterface, RecieverAttributInterface, GrantAttributInterface { }