Trash: Keep provisioned objects out of the trash (#111714)
This commit is contained in:
@@ -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())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user