forked from DeltaPHP/acl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a56aea6
commit cac1a55
Showing
16 changed files
with
108 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
namespace Akademiano\Acl; | ||
|
||
|
||
use Akademiano\Entity\GroupInterface; | ||
use Akademiano\Entity\UserInterface; | ||
|
||
interface AccessCheckIncludeInterface | ||
{ | ||
public function setAclManager(AccessCheckInterface $aclManager); | ||
|
||
public function accessCheck($resource = null, GroupInterface $group = null, UserInterface $user = null, UserInterface $owner = null); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
namespace Akademiano\Acl; | ||
|
||
use Akademiano\Entity\GroupInterface; | ||
use Akademiano\Entity\UserInterface; | ||
|
||
trait AccessCheckIncludeTrait | ||
{ | ||
/** @var AccessCheckInterface */ | ||
protected $aclManager; | ||
|
||
/** | ||
* @return AccessCheckInterface | ||
*/ | ||
public function getAclManager() | ||
{ | ||
return $this->aclManager; | ||
} | ||
|
||
/** | ||
* @param AccessCheckInterface $aclManager | ||
*/ | ||
public function setAclManager(AccessCheckInterface $aclManager) | ||
{ | ||
$this->aclManager = $aclManager; | ||
} | ||
|
||
public function accessCheck($resource = null, GroupInterface $group = null, UserInterface $user = null, UserInterface $owner = null) | ||
{ | ||
return $this->getAclManager()->accessCheck($resource, $group, $user, $owner); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
src/Model/AccessCheckInterface.php → src/AccessCheckInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
namespace Akademiano\Acl\Model; | ||
namespace Akademiano\Acl; | ||
|
||
|
||
use Akademiano\Entity\GroupInterface; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace Akademiano\Acl\Adapter; | ||
|
||
|
||
use Akademiano\Acl\AccessCheckInterface; | ||
|
||
interface AdapterInterface extends AccessCheckInterface | ||
{ | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
src/Model/Adapter/AllowAdapter.php → src/Adapter/AllowAdapter.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/Model/Adapter/DenyAdapter.php → src/Adapter/DenyAdapter.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...del/Adapter/FileBasedAdapterInterface.php → src/Adapter/FileBasedAdapterInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/Model/Adapter/RegisteredAdapter.php → src/Adapter/RegisteredAdapter.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/Model/Adapter/XAclAdapterInterface.php → src/Adapter/XAclAdapterInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters