Trash: Keep provisioned objects out of the trash (#111714)

This commit is contained in:
Stephanie Hingtgen
2025-09-28 20:33:57 +00:00
committed by GitHub
parent 5869fcb97a
commit e01e61a156
4 changed files with 131 additions and 13 deletions
+5
View File
@@ -1097,6 +1097,11 @@ func (s *server) isTrashItemAuthorized(ctx context.Context, iter ListIterator, t
return false
}
// provisioned objects should not be retrievable in the trash
if obj.GetAnnotation(utils.AnnoKeyManagerKind) != "" {
return false
}
// Trash is only accessible to admins or the user who deleted the object
return obj.GetUpdatedBy() == user.GetUID() || trashChecker(iter.Name(), iter.Folder())
}