update vendorings

Signed-off-by: Christian Richter <crichter@owncloud.com>
This commit is contained in:
Christian Richter
2023-09-26 10:23:43 +02:00
parent ea7cd91f36
commit 580de3934d
15 changed files with 131 additions and 86 deletions
+2
View File
@@ -638,6 +638,8 @@ func (m *Manager) UpdateReceivedShare(ctx context.Context, rshare *collaboration
rs.State = rshare.State
case "mount_point":
rs.MountPoint = rshare.MountPoint
case "hide":
continue
default:
return nil, errtypes.NotSupported("updating " + fieldMask.Paths[i] + " is not supported")
}
+2
View File
@@ -403,6 +403,8 @@ func (m *mgr) UpdateShare(ctx context.Context, ref *collaboration.ShareReference
m.model.Shares[idx].Permissions = updated.Permissions
case "expiration":
m.model.Shares[idx].Expiration = updated.Expiration
case "hide":
continue
default:
return nil, errtypes.NotSupported("updating " + fieldMask.Paths[i] + " is not supported")
}
@@ -878,6 +878,7 @@ func (m *Manager) ListReceivedShares(ctx context.Context, filters []*collaborati
if share.IsGrantedToUser(s, user) {
if share.MatchesFiltersWithState(s, state.State, filters) {
s.Hide = state.Hide
rs := &collaboration.ReceivedShare{
Share: s,
State: state.State,
@@ -933,6 +934,7 @@ func (m *Manager) convert(ctx context.Context, userID string, s *collaboration.S
if err == nil && state != nil {
rs.State = state.State
rs.MountPoint = state.MountPoint
rs.Share.Hide = state.Hide
}
return rs
}
@@ -997,6 +999,8 @@ func (m *Manager) UpdateReceivedShare(ctx context.Context, receivedShare *collab
rs.State = receivedShare.State
case "mount_point":
rs.MountPoint = receivedShare.MountPoint
case "hide":
rs.Share.Hide = receivedShare.Share.Hide
default:
return nil, errtypes.NotSupported("updating " + fieldMask.Paths[i] + " is not supported")
}
@@ -68,6 +68,7 @@ type Space struct {
type State struct {
State collaboration.ShareState
MountPoint *provider.Reference
Hide bool
}
// New returns a new Cache instance
@@ -117,6 +118,7 @@ func (c *Cache) Add(ctx context.Context, userID, spaceID string, rs *collaborati
receivedSpace.States[rs.Share.Id.GetOpaqueId()] = &State{
State: rs.State,
MountPoint: rs.MountPoint,
Hide: rs.Share.Hide,
}
return c.persist(ctx, userID)
+4
View File
@@ -242,6 +242,8 @@ func (m *manager) UpdateShare(ctx context.Context, ref *collaboration.ShareRefer
m.shares[i].Permissions = updated.Permissions
case "expiration":
m.shares[i].Expiration = updated.Expiration
case "hide":
m.shares[i].Hide = updated.Hide
default:
return nil, errtypes.NotSupported("updating " + path + " is not supported")
}
@@ -359,6 +361,8 @@ func (m *manager) UpdateReceivedShare(ctx context.Context, receivedShare *collab
rs.State = receivedShare.State
case "mount_point":
rs.MountPoint = receivedShare.MountPoint
case "hide":
continue
default:
return nil, errtypes.NotSupported("updating " + fieldMask.Paths[i] + " is not supported")
}
@@ -447,6 +447,8 @@ func (m *mgr) UpdateReceivedShare(ctx context.Context, receivedShare *collaborat
fields = append(fields, "file_target=?")
rs.MountPoint = receivedShare.MountPoint
params = append(params, rs.MountPoint.Path)
case "hide":
continue
default:
return nil, errtypes.NotSupported("updating " + fieldMask.Paths[i] + " is not supported")
}