public function can($permission, $model, $withExceptions = false)
    {
        if (!is_array($permission)) $permission = [$permission];

        $can = collect($this->object->execute_kw($this->db, $this->uid, $this->password,
            $model, 'check_access_rights',
            $permission, array('raise_exception' => $withExceptions)));

        return $this->makeResponse($can, 0, 'boolean');
    }
public function can($permission, $model, $withExceptions = false)
    {
        if (!is_array($permission)) $permission = [$permission];

        $can = collect($this->object->execute_kw($this->db, $this->uid, $this->password,
            $model, 'check_access_rights',
            $permission, array('raise_exception' => $withExceptions)));

        return $this->makeResponse($can, 0, 'boolean');
    }
public function can ( $ permission , $ model , $ withExceptions = false ) { if ( ! is_array ( $ permission ) ) $ permission = [ $ permission ] ; $ can = collect ( $ this -> object -> execute_kw ( $ this -> db , $ this -> uid , $ this -> password , $ model , 'check_access_rights' , $ permission , array ( 'raise_exception' => $ withExceptions ) ) ) ; return $ this -> makeResponse ( $ can , 0 , 'boolean' ) ; }
Check access rights on a model.
return true or a string with the error.

@param string $permission
@param string $model
@param bool $withExceptions
@return string|true
Check access rights on a model . return true or a string with the error .