π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Improve err
Neeraj Gupta6898f0dbcb41
diff --git a/server/pkg/controller/access/file.go b/server/pkg/controller/access/file.goindex 1bdc2e39a4..9308191df7 100644--- a/server/pkg/controller/access/file.go+++ b/server/pkg/controller/access/file.go@@ -43,7 +43,6 @@ func (c controllerImpl) CanAccessFile(ctx *gin.Context, req *CanAccessFileParams// Only fetch shared collections once when neededvar sharedCollections []int64-for owner, fileIDs := range ownerToFilesMap {if owner == req.ActorUserID {continue@@ -56,10 +55,12 @@ func (c controllerImpl) CanAccessFile(ctx *gin.Context, req *CanAccessFileParamsreturn stacktrace.Propagate(err, "failed to get shared collections")}}- if err := c.CollectionRepo.DoAllFilesExistInGivenCollections(fileIDs, sharedCollections); err != nil {+ if existsErr := c.CollectionRepo.DoAllFilesExistInGivenCollections(fileIDs, sharedCollections); existsErr != nil {log.WithFields(log.Fields{- "req_id": requestid.Get(ctx),- }).WithError(err).Error("access check failed")+ "req_id": requestid.Get(ctx),+ "sharedCollections": sharedCollections,+ "fileIDs": fileIDs,+ }).WithError(existsErr).Error("access check failed")return stacktrace.Propagate(ente.ErrPermissionDenied, "access denied")}}diff --git a/server/pkg/repo/collection.go b/server/pkg/repo/collection.goindex 704a2b739d..f7ddcfeced 100644--- a/server/pkg/repo/collection.go+++ b/server/pkg/repo/collection.go@@ -439,7 +439,6 @@ func (repo *CollectionRepository) DoAllFilesExistInGivenCollections(fileIDs []in}}if len(missingFiles) > 0 {- logrus.WithField("missingFiles", missingFiles).Info("missing files")return stacktrace.Propagate(fmt.Errorf("missing files %v", missingFiles), "")}return nil