Skip to content

Commit

Permalink
default_permissions
Browse files Browse the repository at this point in the history
Co-authored-by: Matthew Evans <[email protected]>
  • Loading branch information
BenjaminCharmes and ml-evs committed Sep 10, 2024
1 parent 009f8a2 commit 26a3c27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pydatalab/pydatalab/routes/v0_1/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def add_items_to_collection(collection_id):
if not refcodes:
return jsonify({"error": "No item provided"}), 400

item_count = flask_mongo.db.items.count_documents({"refcode": {"$in": refcodes}})
item_count = flask_mongo.db.items.count_documents({"refcode": {"$in": refcodes}, **get_default_permissions()})

if item_count == 0:
return jsonify({"error": "No matching items found"}), 404
Expand Down

0 comments on commit 26a3c27

Please sign in to comment.