You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Josh Elser (JIRA)" <ji...@apache.org> on 2018/06/01 19:15:00 UTC

[jira] [Commented] (HBASE-20635) Support to convert the shaded user permission proto to client user permission object

    [ https://issues.apache.org/jira/browse/HBASE-20635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16498423#comment-16498423 ] 

Josh Elser commented on HBASE-20635:
------------------------------------

[~rajeshbabu] do you just need to use {{org.apache.hadoop.hbase.security.access.ShadedAccessControlUtil}} instead? :)

I don't, however, see a conversion for
{noformat}
UserPermission toUserPermission(org.apache.hadoop.hbase.shaded.protobuf.generated.AccessControlProtos.UserPermission){noformat}
like you have in your patch. Should this be added to ShadedAccessControlUtil? (not sure what exactly you need for Phoenix)

> Support to convert the shaded user permission proto to client user permission object
> ------------------------------------------------------------------------------------
>
>                 Key: HBASE-20635
>                 URL: https://issues.apache.org/jira/browse/HBASE-20635
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Rajeshbabu Chintaguntla
>            Assignee: Rajeshbabu Chintaguntla
>            Priority: Major
>         Attachments: HBASE-20635.patch
>
>
> Currently we have API to build the protobuf UserPermission to client user permission in AccessControlUtil but we cannot do the same when we use shaded protobufs.
> {noformat}
>   /**
>    * Converts a user permission proto to a client user permission object.
>    *
>    * @param proto the protobuf UserPermission
>    * @return the converted UserPermission
>    */
>   public static UserPermission toUserPermission(AccessControlProtos.UserPermission proto) {
>     return new UserPermission(proto.getUser().toByteArray(),
>         toTablePermission(proto.getPermission()));
>   }
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)