From: "Maria Khaydich" <maria.khaydich@tarantool.org>
To: "Kirill Yukhin" <kyukhin@tarantool.org>
Cc: tarantool-patches <tarantool-patches@dev.tarantool.org>,
"Vladislav Shpilevoy" <v.shpilevoy@tarantool.org>
Subject: Re: [Tarantool-patches] [PATCH] box: user.grant error should be versatile
Date: Wed, 26 Feb 2020 17:21:00 +0300 [thread overview]
Message-ID: <1582726860.445056855@f382.i.mail.ru> (raw)
In-Reply-To: <20200225222015.wt5azo2dlexkd745@tarantool.org>
[-- Attachment #1: Type: text/plain, Size: 4031 bytes --]
Looks like this patch caused some tests to fail according to Sasha (avtikhon).
I made another commit fixing the issue.
----------------------------------------------------------------------
Previous commit that was merged into master did not do
proper clean-up. That caused occasional failures of other
tests, all with the same error saying user 'guest' already
had access on universe.
Closes #714
---
Branch:
https://github.com/tarantool/tarantool/compare/eljashm/gh-714-box-schema-user-grant-invalid-error
test/box/access.result | 18 ++++++++++++------
test/box/access.test.lua | 10 ++++++----
2 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/test/box/access.result b/test/box/access.result
index b454d0eaa..e351eaf2c 100644
--- a/test/box/access.result
+++ b/test/box/access.result
@@ -2113,23 +2113,29 @@ box.space._priv:delete{1, 'universe', 0}
-- 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.create('grantee')
---
...
-box.schema.user.grant('guest', 'read,write,execute', 'universe')
+box.schema.user.grant('grantee', 'read,write,execute', 'universe')
---
-- error: User 'guest' already has read,write,execute access on universe
+...
+box.schema.user.grant('grantee', 'read,write,execute', 'universe')
+---
+- error: User 'grantee' already has read,write,execute access on universe
...
-- Expected behavior of grant() error shouldn't change otherwise.
sp = box.schema.create_space('not_universe')
---
...
-box.schema.user.grant('guest', 'read,write,execute', 'space', 'not_universe')
+box.schema.user.grant('grantee', 'read,write,execute', 'space', 'not_universe')
+---
+...
+box.schema.user.grant('grantee', 'read,write,execute', 'space', 'not_universe')
---
+- error: User 'grantee' already has read,write,execute access on space 'not_universe'
...
-box.schema.user.grant('guest', 'read,write,execute', 'space', 'not_universe')
+box.schema.user.drop('grantee')
---
-- error: User 'guest' already has read,write,execute access on space 'not_universe'
...
sp:drop()
---
diff --git a/test/box/access.test.lua b/test/box/access.test.lua
index 387c8b06b..6be558247 100644
--- a/test/box/access.test.lua
+++ b/test/box/access.test.lua
@@ -812,11 +812,13 @@ box.space._priv:delete{1, 'universe', 0}
-- 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')
+box.schema.user.create('grantee')
+box.schema.user.grant('grantee', 'read,write,execute', 'universe')
+box.schema.user.grant('grantee', 'read,write,execute', 'universe')
-- Expected behavior of grant() error shouldn't change otherwise.
sp = box.schema.create_space('not_universe')
-box.schema.user.grant('guest', 'read,write,execute', 'space', 'not_universe')
-box.schema.user.grant('guest', 'read,write,execute', 'space', 'not_universe')
+box.schema.user.grant('grantee', 'read,write,execute', 'space', 'not_universe')
+box.schema.user.grant('grantee', 'read,write,execute', 'space', 'not_universe')
+box.schema.user.drop('grantee')
sp:drop()
--
2.24.0
>Среда, 26 февраля 2020, 1:20 +03:00 от Kirill Yukhin < kyukhin@tarantool.org >:
>
>Hello,
>
>On 19 фев 19:35, Maria Khaydich wrote:
>>
>> Error message on granted privileges was not flexible and
>> did not distinguish between universal or any other priviliges
>> leaving either 'nil' or simply '' at the end.
>>
>> Closes #714
>> ----------------------------------------------------------------------
>> Issue:
>> https://github.com/tarantool/tarantool/issues/714
>> Branch:
>> https://github.com/tarantool/tarantool/tree/eljashm/gh-714-box-schema-user-grant-invalid-error
>I've checked your patch into master.
>
>--
>Regards, Kirill Yukhin
--
Maria Khaydich
[-- Attachment #2: Type: text/html, Size: 5847 bytes --]
next prev parent reply other threads:[~2020-02-26 14:21 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
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 [this message]
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=1582726860.445056855@f382.i.mail.ru \
--to=maria.khaydich@tarantool.org \
--cc=kyukhin@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--cc=v.shpilevoy@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