Favorite::isPermitted PHP Method

isPermitted() public method

アクセス権があるかチェックする
public isPermitted ( array $check )
$check array
    public function isPermitted($check)
    {
        if (!$this->_Session) {
            return true;
        }
        $url = $check[key($check)];
        $prefix = BcUtil::authSessionKey('admin');
        $userGroupId = $this->_Session->read('Auth.' . $prefix . '.user_group_id');
        if ($userGroupId == Configure::read('BcApp.adminGroupId')) {
            return true;
        }
        $Permission = ClassRegistry::init('Permission');
        return $Permission->check($url, $userGroupId);
    }