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

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

parent 62068ae5
No related branches found
No related tags found
1 merge request!621Add proper support for LDAP
This commit is part of merge request !621. Comments created here will be created in the context of that merge request.
......@@ -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