-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bf883f6
commit a158f7e
Showing
1 changed file
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{ | ||
'id': 'bugs.core_4836', | ||
'qmid': None, | ||
'tracker_id': 'CORE-4836', | ||
'title': "Grant update(c) on t to U01 with grant option: user U01 will not be able to `revoke update(c) on t from <user | role>` if this `U01` do some DML before revoke", | ||
'description': '', | ||
'min_versions': '3.0', | ||
'versions': [ | ||
{ | ||
'firebird_version': '3.0', | ||
'platform': 'All', | ||
'page_size': '4096', | ||
'init_script': | ||
""" | ||
""", | ||
'test_type': 'ISQL', | ||
'test_script': | ||
""" | ||
create or alter user tmp$c4836 password '123' grant admin role; | ||
create role tmp$r4836; | ||
recreate table test(id int, text varchar(30)); | ||
|
||
grant select on test to public; | ||
grant update(text) on test to tmp$c4836 with grant option; | ||
commit; | ||
|
||
connect '$(DSN)' user tmp$c4836 password '123'; | ||
|
||
grant update (text) on test to tmp$r4836; | ||
commit; | ||
show grants; | ||
commit; | ||
|
||
select * from test; -- this DML prevented to do subsequent `revoke update(text) on test from role` on build 3.0.0.31873 | ||
|
||
commit; | ||
|
||
revoke update(text) on test from role tmp$r4836; | ||
commit; | ||
|
||
show grants; | ||
commit; | ||
|
||
connect '$(DSN)' user sysdba password 'masterkey'; | ||
drop role tmp$r4836; | ||
drop user tmp$c4836; | ||
drop table test; | ||
commit; | ||
""", | ||
'expected_stdout': | ||
""" | ||
/* Grant permissions for this database */ | ||
GRANT SELECT ON TEST TO PUBLIC | ||
GRANT UPDATE (TEXT) ON TEST TO USER TMP$C4836 WITH GRANT OPTION | ||
GRANT UPDATE (TEXT) ON TEST TO ROLE TMP$R4836 GRANTED BY TMP$C4836 | ||
|
||
/* Grant permissions for this database */ | ||
GRANT SELECT ON TEST TO PUBLIC | ||
GRANT UPDATE (TEXT) ON TEST TO USER TMP$C4836 WITH GRANT OPTION | ||
""" | ||
} | ||
] | ||
} |