[#17] acl: Add impersonate flag to bearer token
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
This commit is contained in:
parent
5f318f0b75
commit
b3ccd0166f
6 changed files with 80 additions and 40 deletions
|
@ -427,6 +427,7 @@ func (bt *BearerTokenBody) ToGRPCMessage() grpc.Message {
|
|||
m.SetOwnerId(bt.ownerID.ToGRPCMessage().(*refsGRPC.OwnerID))
|
||||
m.SetLifetime(bt.lifetime.ToGRPCMessage().(*acl.BearerToken_Body_TokenLifetime))
|
||||
m.SetEaclTable(bt.eacl.ToGRPCMessage().(*acl.EACLTable))
|
||||
m.SetImpersonate(bt.impersonate)
|
||||
}
|
||||
|
||||
return m
|
||||
|
@ -479,6 +480,8 @@ func (bt *BearerTokenBody) FromGRPCMessage(m grpc.Message) error {
|
|||
err = bt.eacl.FromGRPCMessage(eacl)
|
||||
}
|
||||
|
||||
bt.impersonate = v.GetAllowImpersonate()
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue