mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-06 19:42:41 +00:00
parent
2495b3cd4c
commit
40585a34e8
2 changed files with 31 additions and 0 deletions
|
@ -538,6 +538,15 @@ class IniAcl extends Object implements AclInterface {
|
|||
*/
|
||||
public $config = null;
|
||||
|
||||
/**
|
||||
* The Set::classicExtract() path to the user/aro identifier in the
|
||||
* acl.ini file. This path will be used to extract the string
|
||||
* representation of a user used in the ini file.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $userPath = 'User.username';
|
||||
|
||||
/**
|
||||
* Initialize method
|
||||
*
|
||||
|
@ -599,6 +608,10 @@ class IniAcl extends Object implements AclInterface {
|
|||
$this->config = $this->readConfigFile(CONFIGS . 'acl.ini.php');
|
||||
}
|
||||
$aclConfig = $this->config;
|
||||
|
||||
if (is_array($aro)) {
|
||||
$aro = Set::classicExtract($aro, $this->userPath);
|
||||
}
|
||||
|
||||
if (isset($aclConfig[$aro]['deny'])) {
|
||||
$userDenies = $this->arrayTrim(explode(",", $aclConfig[$aro]['deny']));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue