[
https://issues.apache.org/jira/browse/SENTRY-594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14296475#comment-14296475
]
Xiaomeng Huang commented on SENTRY-594:
---------------------------------------
Thanks Lenni for reviewing!
Pushed to master:
commit 86e18a10f3ddd29fde7f05afa9c0096775ec8240
Author: Huang Xiaomeng <[email protected]>
Date: Fri Jan 23 10:24:54 2015 +0800
SENTRY-594: Alter database should check output privilege instead of input
(Reviewed by Lenni Kuff)
> Alter database should check output privilege instead of input
> -------------------------------------------------------------
>
> Key: SENTRY-594
> URL: https://issues.apache.org/jira/browse/SENTRY-594
> Project: Sentry
> Issue Type: Bug
> Reporter: Xiaomeng Huang
> Assignee: Xiaomeng Huang
> Attachments: SENTRY-594.001.patch
>
>
> "ALTER DATABASE" command can get entities from WriteEntity, and get nothing
> from ReadEntity. So this command should check output privilege instead of
> input.
> What's more, "ALTER TABLE" also check output privilege, likes below:
> {code}
> HiveAuthzPrivileges alterTablePrivilege = new
> HiveAuthzPrivileges.AuthzPrivilegeBuilder().
> addOutputObjectPriviledge(AuthorizableType.Table,
> EnumSet.of(DBModelAction.ALTER)).
> setOperationScope(HiveOperationScope.TABLE).
> setOperationType(HiveOperationType.DDL).
> build();
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)