|
[
Permalink
| « Hide
]
Dmitry Yemanov added a comment - 20/May/16 08:33 AM
We use the standard syntax. SQL spec declares WITH GRANT OPTION for privileges and WITH ADMIN OPTION for roles. I'm not sure they mean the same though, it needs checking.
Mark Rotteveel made changes - 20/May/16 08:34 AM
Alexander Peshkov made changes - 20/May/16 08:35 AM
I hadn't thought of that. This ticket was triggered by this SO question: http://stackoverflow.com/questions/37327616/in-firebird-database-how-do-i-grant-a-role-to-a-user-with-the-grant-option
If this is specified by the SQL standard, then maybe we should just leave this as is. In our code ADMIN option behaves exactly like GRANT which violates standard. It should behave like Mark describes (up to ability to drop granted role) - reviewed standard not long ago.
What about extension of GRANT option for roles - that should IMHO be decided separately.
Alexander Peshkov made changes - 20/May/16 08:38 AM
And I tend to treat it as a bug in our GRANT/REVOKE.
Alexander Peshkov made changes - 20/May/16 08:39 AM
Alexander Peshkov made changes - 24/Aug/16 03:47 PM
adminOption.sql contains a number of tests checking behavior of grant WITH ADMIN OPTION
Alexander Peshkov made changes - 24/Aug/16 03:53 PM
Fix in B3_0 is minimalistic - I do not want to change behavior in production version, just fixed obvious bug that any role can be dropped by any user. Full fix with SQL standard compliant ADMIN OPTION in role grants is in master branch, i.e. FB4.
Attention - to obtain new behavior in old databases roles should be recreated!
Alexander Peshkov made changes - 25/Aug/16 12:14 PM
Pavel Zotov made changes - 30/Aug/16 02:01 PM
Pavel Zotov made changes - 30/Aug/16 02:08 PM
|