撤消角色,位用户仍然具有通过角色获得的特权

问题描述 投票:0回答:1

我对撤销命令有问题。我创建了角色并将角色授予“表上的SELECTE”特权。然后,我将角色授予用户。然后,我撤消了用户的角​​色。但是用户仍然具有通过角色获得的“在表上选择”特权。我做错了什么?

HR用户:

create table testtable (id number);--Table TESTTABLE created 
create role trole;--Role TROLE created 
grant select on testtable to trole;--Grant succeeded 
grant trole to test_user;--Grant succeeded 

test_user:

set role trole;--Role TROLE succeeded. 
select * from hr.testtable;--working 

HR用户:

revoke trole from test_user;--Revoke succeeded. 

Test_user:

select * from hr.testtable;--working again despite that the fact the role is revoked. 

注意:test_user没有其他任何授予

sql oracle grant revoke
1个回答
0
投票

撤消将会从用户中删除该角色以及属于该角色的任何特权。在您的情况下,听起来test_user具有一些其他特权,例如直接授予或通过PUBLIC角色继承的SELECT ANY TABLE。检查此帖子以查找所有授予的特权:How to show all privileges from a user in oracle?

© www.soinside.com 2019 - 2024. All rights reserved.