From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 50EC828982 for ; Wed, 8 Aug 2018 15:51:26 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iEv9rbLFBBAR for ; Wed, 8 Aug 2018 15:51:26 -0400 (EDT) Received: from smtp1.mail.ru (smtp1.mail.ru [94.100.179.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 129832897E for ; Wed, 8 Aug 2018 15:51:25 -0400 (EDT) From: Nikita Pettik Subject: [tarantool-patches] [PATCH] Add read privilege in access test for FK space Date: Wed, 8 Aug 2018 22:51:19 +0300 Message-Id: <20180808195119.18759-1-korablev@tarantool.org> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org Cc: kyukhin@tarantool.org, Nikita Pettik After introducing foreign key constraints, space:drop() processes lookup in _fk_constraint system space to drop child constraints (if any exist). Thus, we must provide at least 'read' privilege for this space. --- Branch: https://github.com/tarantool/tarantool/tree/np/fix-access-test Issue: no corresponding issue test/box/access.result | 3 +++ test/box/access.test.lua | 1 + 2 files changed, 4 insertions(+) diff --git a/test/box/access.result b/test/box/access.result index bc2a182da..c503babca 100644 --- a/test/box/access.result +++ b/test/box/access.result @@ -1443,6 +1443,9 @@ box.schema.user.grant('tester', 'read', 'space', '_sequence') box.schema.user.grant('tester', 'read', 'space', '_trigger') --- ... +box.schema.user.grant('tester', 'read', 'space', '_fk_constraint') +--- +... box.session.su("tester") --- ... diff --git a/test/box/access.test.lua b/test/box/access.test.lua index a7e636c79..fafdb130c 100644 --- a/test/box/access.test.lua +++ b/test/box/access.test.lua @@ -548,6 +548,7 @@ box.schema.user.grant('tester', 'create', 'universe') --box.schema.user.grant('tester', 'create' , 'sequence') box.schema.user.grant('tester', 'read', 'space', '_sequence') box.schema.user.grant('tester', 'read', 'space', '_trigger') +box.schema.user.grant('tester', 'read', 'space', '_fk_constraint') box.session.su("tester") -- successful create s1 = box.schema.space.create("test_space") -- 2.15.1