Tarantool development patches archive
 help / color / mirror / Atom feed
From: Konstantin Osipov <kostja@tarantool.org>
To: tarantool-patches@freelists.org
Cc: vdavydov.dev@gmail.com, Serge Petrenko <sergepetrenko@tarantool.org>
Subject: Re: [tarantool-patches] [PATCH 2/2] box: autogrant CREATE,ALTER,DROP to users with READ+WRITE
Date: Thu, 1 Nov 2018 18:34:44 +0300	[thread overview]
Message-ID: <20181101153444.GJ30032@chai> (raw)
In-Reply-To: <269e36d8ddf6cba1751da54ee66b9c895df40701.1540903773.git.sergepetrenko@tarantool.org>

* Serge Petrenko <sergepetrenko@tarantool.org> [18/10/30 16:36]:
> This patch adds an upgrade script to grant CREATE, ALTER, DROP
> privileges to users which have READ+WRITE on respective objects.
> This is needed after removing 1.7 compatibility mode for privileges.
> 
> Closes #3539
> ---
>  src/box/lua/upgrade.lua | 31 +++++++++++++++++++++++++++++++
>  1 file changed, 31 insertions(+)
> 
> diff --git a/src/box/lua/upgrade.lua b/src/box/lua/upgrade.lua
> index d9c2ae447..64f74f9d3 100644
> --- a/src/box/lua/upgrade.lua
> +++ b/src/box/lua/upgrade.lua
> @@ -501,6 +501,35 @@ end
>  -- Tarantool 2.1.0
>  --------------------------------------------------------------------------------
>  
> +local function upgrade_priv_to_2_1_0()
> +    local _priv = box.space[box.schema.PRIV_ID]
> +    local _user = box.space[box.schema.USER_ID]
> +    -- Since we remove 1.7 compatibility in 2.1.0, we have to
> +    -- grant ALTER and DROP to all users with READ + WRITE on
> +    -- respective objects. We also grant CREATE on entities

> +    -- or on universe if a user has READ and WRITE on an entity
> +    -- or on universe respectively. We do not grant CREATE on

No, please add ALTER and DROP only to the users who have
READ+WRITE on the universe. In other words, don't bother with
individual objects.

> +    -- objects, since it has no effect. We also skip grants for
> +    -- sequences since they were added after the new privileges
> +    -- and compatibility mode was always off for them.

-- 
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov

  reply	other threads:[~2018-11-01 15:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-30 13:31 [PATCH 0/2] Remove 1.7 privilege compatibility mode Serge Petrenko
2018-10-30 13:32 ` [PATCH 1/2] box: remove compatibility mode for privileges Serge Petrenko
2018-11-01 15:32   ` [tarantool-patches] " Konstantin Osipov
2018-10-30 13:32 ` [PATCH 2/2] box: autogrant CREATE,ALTER,DROP to users with READ+WRITE Serge Petrenko
2018-11-01 15:34   ` Konstantin Osipov [this message]
2018-10-30 17:48 ` [PATCH 0/2] Remove 1.7 privilege compatibility mode Vladimir Davydov
2018-11-01 15:35   ` [tarantool-patches] " Konstantin Osipov

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=20181101153444.GJ30032@chai \
    --to=kostja@tarantool.org \
    --cc=sergepetrenko@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=vdavydov.dev@gmail.com \
    --subject='Re: [tarantool-patches] [PATCH 2/2] box: autogrant CREATE,ALTER,DROP to users with READ+WRITE' \
    /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