From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> To: Maria Khaydich <maria.khaydich@tarantool.org>, tarantool-patches <tarantool-patches@dev.tarantool.org>, Igor Munkin <imun@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH] box: user.grant error should be versatile Date: Thu, 20 Feb 2020 23:44:33 +0100 [thread overview] Message-ID: <f926d12f-74fe-88ca-b86d-9a2e581ccb84@tarantool.org> (raw) In-Reply-To: <1582130122.751366742@f143.i.mail.ru> Hi! Thanks for the patch! On 19/02/2020 17:35, Maria Khaydich wrote: > Error message on granted privileges was not flexible and > did not distinguish between universal or any other priviliges priviliges -> privileges > leaving either 'nil' or simply '' at the end. > > Closes #714 > > diff --git a/test/box/access.result b/test/box/access.result > index 9554991ad..be8b1c521 100644 > --- a/test/box/access.result > +++ b/test/box/access.result > @@ -532,7 +532,7 @@ box.space._priv:select{id} > ... > box.schema.user.grant('user', 'read', 'universe') > --- > -- error: User 'user' already has read access on universe '' > +- error: User 'user' already has read access on universe > ... > box.space._priv:select{id} > --- > @@ -738,7 +738,7 @@ box.schema.user.grant('guest', 'read,write,execute', 'universe') > ... > box.schema.user.grant('guest', 'read,write,execute', 'universe') > --- > -- error: User 'guest' already has read,write,execute access on universe '' > +- error: User 'guest' already has read,write,execute access on universe > ... > box.schema.user.grant('guest', 'read,write,execute', 'universe', '', { if_not_exists = true }) > --- > @@ -2108,3 +2108,29 @@ box.space._priv:delete{1, 'universe', 0} > --- > - error: 'Incorrect grant arguments: can''t revoke universe from the admin user' > ... > +-- > +-- gh-714: box.schema.user.grant error should be versatile, > +-- i.e. error on universally granted privileges shouldn't > +-- include any redundant details and/or symbols > +-- > +box.schema.user.grant('guest', 'read,write,execute', 'universe') > +--- > +... > +box.schema.user.grant('guest', 'read,write,execute', 'universe') > +--- > +- error: User 'guest' already has read,write,execute access on universe > +... > +-- expected behavior of grant() error shouldn't change otherwise It would be good to have a dot in the end of this sentence and of the previous comment. And to start the sentence with a capital letter. Although I can't block the patch because of this nit, so LGTM and up to you.
next prev parent reply other threads:[~2020-02-20 22:44 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-02-19 16:35 Maria Khaydich 2020-02-20 10:47 ` Igor Munkin 2020-02-20 15:48 ` Maria Khaydich 2020-02-20 22:44 ` Vladislav Shpilevoy [this message] 2020-02-20 22:45 ` Vladislav Shpilevoy 2020-02-24 19:57 ` Kirill Yukhin 2020-02-25 11:53 ` Maria Khaydich 2020-02-25 22:20 ` Kirill Yukhin 2020-02-26 14:21 ` Maria Khaydich 2020-02-26 14:55 ` Igor Munkin 2020-02-26 15:16 ` Alexander Tikhonov 2020-02-27 14:30 ` Igor Munkin 2020-02-27 21:06 ` Alexander Turenko
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=f926d12f-74fe-88ca-b86d-9a2e581ccb84@tarantool.org \ --to=v.shpilevoy@tarantool.org \ --cc=imun@tarantool.org \ --cc=maria.khaydich@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH] box: user.grant error should be versatile' \ /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