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
b25c782f0d
commit
40f0a43462
|
@ -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