robregonm / yii2-auth

Yii 2 User Authentication & Role Based Access Control (RBAC) Module
BSD 3-Clause "New" or "Revised" License
77 stars 37 forks source link

Calling unknown method: auth\components\User::checkAccess() #19

Closed twocabbages closed 10 years ago

twocabbages commented 10 years ago

In class auth\components\User I can only work like this

public function checkAccess($operation, $params = [], $allowCaching = true)
{
        // Always return true when SuperAdmin user
        if ($this->getIsSuperAdmin()) {
            return true;
        }
        return parent::can($operation, $params, $allowCaching);
}

not

public function checkAccess($operation, $params = [], $allowCaching = true)
{
        // Always return true when SuperAdmin user
        if ($this->getIsSuperAdmin()) {
            return true;
        }
        return parent::checkAccess($operation, $params, $allowCaching);
}
robregonm commented 10 years ago

Thanks for reporting.