From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: tarantool-patches@freelists.org,
Alex Khatskevich <avkhatskevich@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH 2/3] Allow use existing user
Date: Tue, 26 Jun 2018 14:11:44 +0300 [thread overview]
Message-ID: <2da4ba98-0c83-3284-c3c1-c3e4cbceabe1@tarantool.org> (raw)
In-Reply-To: <3ef155eb-a465-b96b-e0b8-736db5c758a1@tarantool.org>
Thanks for the fixes! The patch is pushed.
On 26/06/2018 00:55, Alex Khatskevich wrote:
>
>>> @@ -138,11 +138,19 @@ end
>>> --------------------------------------------------------------------------------
>>> -- Schema
>>> --------------------------------------------------------------------------------
>>> +local function create_user(username, password)
>>> + box.schema.user.create(username, {
>>> + password = password,
>>> + if_not_exists = true,
>>> + })
>>> + -- Replication may has not been granted, if user exists.
>>> + box.schema.user.grant(username, 'replication', nil, nil,
>>> + {if_not_exists = true})
>>> +end
>>> local function storage_schema_v1(username, password)
>>> log.info("Initializing schema")
>>> - box.schema.user.create(username, {password = password})
>>> - box.schema.user.grant(username, 'replication')
>>> + create_user(username, password)
>>
>> 1. Please, just inline this function. It is not needed anywhere else
>> and is extremely simple.
>>
> done
>
next prev parent reply other threads:[~2018-06-26 11:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-22 21:43 [tarantool-patches] [PATCH 0/3][vshard] Small patches AKhatskevich
2018-06-22 21:43 ` [tarantool-patches] [PATCH 1/3] Do not force login/pass in URI AKhatskevich
2018-06-22 22:11 ` [tarantool-patches] " Vladislav Shpilevoy
2018-06-25 21:56 ` Alex Khatskevich
2018-06-26 11:11 ` Vladislav Shpilevoy
2018-06-22 21:43 ` [tarantool-patches] [PATCH 2/3] Allow use existing user AKhatskevich
2018-06-22 22:12 ` [tarantool-patches] " Vladislav Shpilevoy
2018-06-25 21:55 ` Alex Khatskevich
2018-06-26 11:11 ` Vladislav Shpilevoy [this message]
2018-06-22 21:43 ` [tarantool-patches] [PATCH 3/3] Introduce destroy module feature AKhatskevich
2018-06-22 22:11 ` [tarantool-patches] " Vladislav Shpilevoy
2018-06-25 21:54 ` Alex Khatskevich
2018-06-26 11:11 ` Vladislav Shpilevoy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2da4ba98-0c83-3284-c3c1-c3e4cbceabe1@tarantool.org \
--to=v.shpilevoy@tarantool.org \
--cc=avkhatskevich@tarantool.org \
--cc=tarantool-patches@freelists.org \
--subject='[tarantool-patches] Re: [PATCH 2/3] Allow use existing user' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox