forked from TrueCloudLab/frostfs-node
[#821] node: Pass user.ID by value
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
c99157f0b2
commit
c516c7c5f4
12 changed files with 27 additions and 27 deletions
|
@ -165,7 +165,7 @@ func (v *FormatValidator) validateSignatureKey(obj *objectSDK.Object) error {
|
|||
}
|
||||
|
||||
token := obj.SessionToken()
|
||||
ownerID := *obj.OwnerID()
|
||||
ownerID := obj.OwnerID()
|
||||
|
||||
if token == nil || !token.AssertAuthKey(&key) {
|
||||
return v.checkOwnerKey(ownerID, key)
|
||||
|
@ -412,7 +412,7 @@ func (v *FormatValidator) checkAttributes(obj *objectSDK.Object) error {
|
|||
var errIncorrectOwner = errors.New("incorrect object owner")
|
||||
|
||||
func (v *FormatValidator) checkOwner(obj *objectSDK.Object) error {
|
||||
if idOwner := obj.OwnerID(); idOwner == nil || len(idOwner.WalletBytes()) == 0 {
|
||||
if idOwner := obj.OwnerID(); idOwner.IsEmpty() {
|
||||
return errIncorrectOwner
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue