|
@@ -410,27 +410,27 @@ class Auth extends \ba\Auth
|
|
|
|
|
|
public function check(string $name, int $uid = 0, string $relation = 'or', string $mode = 'url'): bool
|
|
|
{
|
|
|
- return parent::check($name, $uid ?: $this->id, $relation, $mode);
|
|
|
+ return parent::check($name, $uid ?: $this->ID, $relation, $mode);
|
|
|
}
|
|
|
|
|
|
public function getGroups(int $uid = 0): array
|
|
|
{
|
|
|
- return parent::getGroups($uid ?: $this->id);
|
|
|
+ return parent::getGroups($uid ?: $this->ID);
|
|
|
}
|
|
|
|
|
|
public function getRuleList(int $uid = 0): array
|
|
|
{
|
|
|
- return parent::getRuleList($uid ?: $this->id);
|
|
|
+ return parent::getRuleList($uid ?: $this->ID);
|
|
|
}
|
|
|
|
|
|
public function getRuleIds(int $uid = 0): array
|
|
|
{
|
|
|
- return parent::getRuleIds($uid ?: $this->id);
|
|
|
+ return parent::getRuleIds($uid ?: $this->ID);
|
|
|
}
|
|
|
|
|
|
public function getMenus(int $uid = 0): array
|
|
|
{
|
|
|
- return parent::getMenus($uid ?: $this->id);
|
|
|
+ return parent::getMenus($uid ?: $this->ID);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -439,7 +439,6 @@ class Auth extends \ba\Auth
|
|
|
*/
|
|
|
public function isSuperAdmin(): bool
|
|
|
{
|
|
|
- var_dump($this->getRuleIds());die;
|
|
|
return in_array('*', $this->getRuleIds());
|
|
|
}
|
|
|
|
|
@@ -451,7 +450,7 @@ class Auth extends \ba\Auth
|
|
|
public function getAdminChildGroups(): array
|
|
|
{
|
|
|
$groupIds = Db::name('admin_group_access')
|
|
|
- ->where('uid', $this->id)
|
|
|
+ ->where('uid', $this->ID)
|
|
|
->select();
|
|
|
$children = [];
|
|
|
foreach ($groupIds as $group) {
|