diff --git a/share/sql/sql.go b/share/sql/sql.go index f303864..f25e7a7 100644 --- a/share/sql/sql.go +++ b/share/sql/sql.go @@ -236,8 +236,10 @@ func (m *mgr) GetShare(ctx context.Context, ref *collaboration.ShareReference) ( err = errtypes.NotFound(ref.String()) } - // resolve grantee's user type - s.Grantee.GetUserId().Type, _ = m.getUserType(ctx, s.Grantee.GetUserId().OpaqueId) + // resolve grantee's user type if applicable + if s.Grantee.Type == provider.GranteeType_GRANTEE_TYPE_USER { + s.Grantee.GetUserId().Type, _ = m.getUserType(ctx, s.Grantee.GetUserId().OpaqueId) + } path, err := m.getPath(ctx, s.ResourceId) if err != nil {