Add audit flag
All checks were successful
ci/woodpecker/manual/woodpecker Pipeline was successful

This commit is contained in:
Madis Mägi 2023-08-29 21:21:38 +03:00
parent e67f00652b
commit 9f0119fcfe

View File

@ -20,12 +20,15 @@ db = MongoClient(const.MONGO_URI).get_default_database()
@page_inventory.route("/m/inventory/<item_id>/view")
def view_inventory_view(item_id):
user = read_user()
template = "inventory_view.html"
item = db.inventory.find_one({ "_id": ObjectId(item_id) })
if not read_user():
if not user:
if not item["inventory"].get("public"):
return do_login()
template = "inventory_view_public.html"
else:
can_audit = "k-space:janitors" in user["groups"]
bucket=get_bucket()
photo_url = bucket.generate_presigned_url(
ClientMethod='get_object',