Skip to content

Commit

Permalink
Fixes gh-21 Function grant//create doc improvments
Browse files Browse the repository at this point in the history
  • Loading branch information
pgulutzan committed Jul 26, 2016
1 parent 4fddb17 commit f073479
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions sphinx/book/box/authentication.rst
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ The possible options are:
box.schema.func.create('f', {language = 'C', setuid = false})
Specifying :code:`if_not_exists=true` would cause ``error: Function '...' already
exists`` if the function already exists.
Specifying :code:`if_not_exists=false` would cause ``error: Function '...' already
exists`` if the _func tuple already exists.

Specifying :code:`setuid=true` would cause the setuid flag (the fourth field in
the _func tuple) to have a value meaning "true", and the effect of that is that
Expand Down
14 changes: 8 additions & 6 deletions sphinx/book/box/box_schema.rst
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,14 @@ available for insert, select, and all the other :ref:`box.space <box_space>` fun
Grant :ref:`privileges <authentication-privileges>` to a user.

:param string user-name: the name of the user
:param string privileges: either privilege,object-type,object-name
or privilege,'universe' where privilege =
'read' or 'write' or 'execute' or a combination
:param string privileges: privilege,object-type,object-name
where privilege = 'read' or 'write' or 'execute' or a combination,
and object-type = 'space' or 'function'.
Or: privilege,'universe'.
Or: role-name.

If :samp:`'function','{object-name}'` is specified, then a _func tuple with that object-name must exist.

**Examples:**

box.schema.user.grant('Lena', 'read', 'space', 'tester') |br|
Expand All @@ -162,10 +164,10 @@ available for insert, select, and all the other :ref:`box.space <box_space>` fun
Revoke :ref:`privileges <authentication-privileges>` from a user.

:param string user-name: the name of the user
:param string privileges: either privilege,object-type,object-name
or privilege,'universe' where privilege =
'read' or 'write' or 'execute' or a combination
:param string privileges: privilege,object-type,object-name
where privilege = 'read' or 'write' or 'execute' or a combination,
and object-type = 'space' or 'function'.
Or: privilege,'universe'.
Or: role-name.

**Examples:**
Expand Down

0 comments on commit f073479

Please sign in to comment.