From: Serge Petrenko <sergepetrenko@tarantool.org> To: Vladimir Davydov <vdavydov.dev@gmail.com> Cc: kostja@tarantool.org, tarantool-patches@freelists.org Subject: Re: [PATCH v2 3/4] Add single object privilege checks to access_check_ddl. Date: Thu, 23 Aug 2018 10:51:29 +0300 [thread overview] Message-ID: <23130F39-64EC-4DB3-B72C-E795F2260457@tarantool.org> (raw) In-Reply-To: <20180822164755.6eomdsuptgluumc2@esperanza> > 22 авг. 2018 г., в 19:47, Vladimir Davydov <vdavydov.dev@gmail.com> написал(а): > >> >> +--- >> +- true >> +... >> +-- fixme: cannot grant create on a single space >> +-- this is because when checking for create >> +-- access_check_ddl ignores space privileges, > > Please don't use code function names in tests - if they change (and they > can), it'll be difficult to understand what this test is about. Sorry, fixed. > >> +-- assuming that there is no space yet. > > I thought you fixed that in v2 by dropping PRIV_C check from > access_check_ddl, no? Yes. This was fixed in v2, sorry. Changed the test accordingly. I also rebased the patch on top of 1.10 and pushed it on a separate branch, since previous 2 patches are already pushed to 1.10 and we decided not to push the fourth patch yet. The branch is https://github.com/tarantool/tarantool/tree/sergepetrenko/gh-3530-object-access-checks Here’s everything that's changed: diff --git a/test/box/access.result b/test/box/access.result index 4f0607471..933564a2b 100644 --- a/test/box/access.result +++ b/test/box/access.result @@ -1906,11 +1906,7 @@ box.space.space1.index[0] == nil --- - true ... --- fixme: cannot grant create on a single space --- this is because when checking for create --- access_check_ddl ignores space privileges, --- assuming that there is no space yet. -box.schema.user.grant("test", "create", "space") +box.schema.user.grant("test", "create", "space", "space1") --- ... box.session.su("test") diff --git a/test/box/access.test.lua b/test/box/access.test.lua index d3e2aab98..b252b4bd9 100644 --- a/test/box/access.test.lua +++ b/test/box/access.test.lua @@ -740,11 +740,7 @@ box.session.su("test") box.space.space1:create_index("pk") box.session.su("admin") box.space.space1.index[0] == nil --- fixme: cannot grant create on a single space --- this is because when checking for create --- access_check_ddl ignores space privileges, --- assuming that there is no space yet. -box.schema.user.grant("test", "create", "space") +box.schema.user.grant("test", "create", "space", "space1") box.session.su("test") _ = box.space.space1:create_index("pk") box.space.space1:insert{5}
next prev parent reply other threads:[~2018-08-23 7:51 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-08-22 13:39 [PATCH v2 0/4] Finish implementation of privileges Serge Petrenko 2018-08-22 13:39 ` [PATCH v2 1/4] Introduce separate entity object types for entity privileges Serge Petrenko 2018-08-22 15:42 ` Serge Petrenko 2018-08-22 16:22 ` Vladimir Davydov 2018-08-22 13:39 ` [PATCH v2 2/4] Add entities user, role to access control Serge Petrenko 2018-08-22 16:36 ` Vladimir Davydov 2018-08-22 13:39 ` [PATCH v2 3/4] Add single object privilege checks to access_check_ddl Serge Petrenko 2018-08-22 16:47 ` Vladimir Davydov 2018-08-23 7:51 ` Serge Petrenko [this message] 2018-08-23 8:57 ` Vladimir Davydov 2018-08-22 13:39 ` [PATCH v2 4/4] Add a privilege upgrade script and update tests Serge Petrenko 2018-08-22 16:48 ` Vladimir Davydov 2018-08-23 7:54 ` Serge Petrenko
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=23130F39-64EC-4DB3-B72C-E795F2260457@tarantool.org \ --to=sergepetrenko@tarantool.org \ --cc=kostja@tarantool.org \ --cc=tarantool-patches@freelists.org \ --cc=vdavydov.dev@gmail.com \ --subject='Re: [PATCH v2 3/4] Add single object privilege checks to access_check_ddl.' \ /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