Skip to content

Commit

Permalink
Backport fix to avoid reading global config data.
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Oct 28, 2019
1 parent 0bedd3a commit e693ad7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Auth/AclTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,11 @@ protected function _getAvailableRoles() {
return $this->_roles;
}

$roles = Configure::read($this->getConfig('rolesTable'));
$rolesTableKey = $this->getConfig('rolesTable');
if (!$rolesTableKey) {
throw new Exception('Invalid/missing rolesTable config');
}
$roles = Configure::read($rolesTableKey);
if (is_array($roles)) {
if ($this->getConfig('superAdminRole')) {
$key = $this->getConfig('superAdmin') ?: 'superadmin';
Expand Down

0 comments on commit e693ad7

Please sign in to comment.