X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/5ff990155f06109c55bbb832a8dd670265d3f3d1..3db43f179cf2fe1fb4077f8789d2b53588806517:/services/api/app/models/collection.rb diff --git a/services/api/app/models/collection.rb b/services/api/app/models/collection.rb index 84101ffdd4..accd2cc62c 100644 --- a/services/api/app/models/collection.rb +++ b/services/api/app/models/collection.rb @@ -10,6 +10,9 @@ class Collection < ArvadosModel before_validation :set_portable_data_hash validate :ensure_hash_matches_manifest_text + # Query only undeleted collections by default. + default_scope where("expires_at IS NULL or expires_at > CURRENT_TIMESTAMP") + api_accessible :user, extend: :common do |t| t.add :name t.add :description