mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-26 05:58:27 -05:00
+2
@@ -144,6 +144,8 @@ func (s *svc) handleMove(ctx context.Context, w http.ResponseWriter, r *http.Req
|
||||
isChild, err := s.referenceIsChildOf(ctx, s.gatewaySelector, dst, src)
|
||||
if err != nil {
|
||||
switch err.(type) {
|
||||
case errtypes.IsNotFound:
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
case errtypes.IsNotSupported:
|
||||
log.Error().Err(err).Msg("can not detect recursive move operation. missing machine auth configuration?")
|
||||
w.WriteHeader(http.StatusForbidden)
|
||||
|
||||
+3
@@ -339,6 +339,9 @@ func (s *svc) sspReferenceIsChildOf(ctx context.Context, selector pool.Selectabl
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
if parentStatRes.Status.Code != rpc.Code_CODE_OK {
|
||||
return false, errtypes.NewErrtypeFromStatus(parentStatRes.Status)
|
||||
}
|
||||
parentAuthCtx, err := authContextForUser(client, parentStatRes.Info.Owner, s.c.MachineAuthAPIKey)
|
||||
if err != nil {
|
||||
return false, err
|
||||
|
||||
Reference in New Issue
Block a user