HBASE-20635 Add missing shaded-pb conversion method for UserPermission
Signed-off-by: Josh Elser <elserj@apache.org> Signed-off-by: Ted Yu <yuzhihong@gmail.com>
This commit is contained in:
parent
a8ea49bfb7
commit
c0d67209df
|
@ -274,4 +274,15 @@ public class ShadedAccessControlUtil {
|
|||
}
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a user permission proto to a client user permission object.
|
||||
*
|
||||
* @param proto the protobuf UserPermission
|
||||
* @return the converted UserPermission
|
||||
*/
|
||||
public static UserPermission toUserPermission(org.apache.hadoop.hbase.shaded.protobuf.generated.AccessControlProtos.UserPermission proto) {
|
||||
return new UserPermission(proto.getUser().toByteArray(),
|
||||
toTablePermission(proto.getPermission()));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue