Skip to content
Snippets Groups Projects
Commit 552228a0 authored by Dmitry Ivanov's avatar Dmitry Ivanov
Browse files

fix: make `object_name` optional in `pico.grant_privilege`

parent 47000b4c
No related branches found
No related tags found
No related merge requests found
......@@ -740,6 +740,11 @@ function pico.grant_privilege(grantee, privilege, object_type, object_name, opts
box.internal.check_param(privilege, 'privilege', 'string')
box.internal.check_param(object_type, 'object_type', 'string')
object_name = object_name ~= nil and object_name or ''
-- `object_name` is optional, thus it might contain `opts` instead
if type(object_name) == 'table' and opts == nil then
opts = object_name
object_name = ''
end
box.internal.check_param(object_name, 'object_name', 'string')
box.internal.check_param_table(opts, { timeout = 'number' })
opts = opts or {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment