Skip to content

Commit

Permalink
Fix accessing ocm shares
Browse files Browse the repository at this point in the history
  • Loading branch information
aduffeck committed Oct 9, 2023
1 parent 11fff04 commit a579afb
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -966,9 +966,11 @@ func (s *service) resolveToken(ctx context.Context, share interface{}) (*provide
return nil, nil, errtypes.NewErrtypeFromStatus(gsr.Status)
}
accessMethods := gsr.GetShare().GetAccessMethods()
if accessMethods == nil || len(accessMethods) > 0 {
if len(accessMethods) == 0 {
return nil, nil, errtypes.PermissionDenied("failed to get access to the requested resource")
}
resolvedShare = gsr.GetShare()
resourceID = gsr.GetShare().GetResourceId()
perms = accessMethods[0].GetWebdavOptions().Permissions
}

Expand Down

0 comments on commit a579afb

Please sign in to comment.