tarantool / tarantool-python

Python client library for Tarantool
https://www.tarantool.io
BSD 2-Clause "Simplified" License
101 stars 46 forks source link

Connector requires weird CALL permission to fetch space schema #30

Closed rtsisyk closed 10 years ago

rtsisyk commented 10 years ago
Traceback (most recent call last):
  File "./test.py", line 5, in <module>
    server.space(256).select()
  File "/data/work/tarantool/master/test/lib/tarantool-python/tarantool/connection.py", line 430, in space
    return Space(self, space_name)
  File "/data/work/tarantool/master/test/lib/tarantool-python/tarantool/space.py", line 27, in __init__
    self.space_no = self.connection.schema.get_space(space_name).sid
  File "/data/work/tarantool/master/test/lib/tarantool-python/tarantool/schema.py", line 74, in get_space
    space)
  File "/data/work/tarantool/master/test/lib/tarantool-python/tarantool/connection.py", line 250, in call
    response = self._send_request(request)
  File "/data/work/tarantool/master/test/lib/tarantool-python/tarantool/connection.py", line 225, in _send_request
    request)
  File "/data/work/tarantool/master/test/lib/tarantool-python/tarantool/connection.py", line 169, in _send_request_wo_reconnect
    response = Response(self, self._read_response())
  File "/data/work/tarantool/master/test/lib/tarantool-python/tarantool/response.py", line 60, in __init__
    raise DatabaseError(self._return_code, self._return_message)
tarantool.error.DatabaseError: (53, "Execute access denied for user 'guest' to function 'box.space._space.index.primary:s'")
bigbes commented 10 years ago

Fixed, from now on. Now it requires only:

box.schema.user.grant('test', 'read,write', 'space', '_space')
box.schema.user.grant('test', 'read,write', 'space', '_index')