This commit is contained in:
parent
e67f00652b
commit
9f0119fcfe
@ -20,12 +20,15 @@ db = MongoClient(const.MONGO_URI).get_default_database()
|
|||||||
|
|
||||||
@page_inventory.route("/m/inventory/<item_id>/view")
|
@page_inventory.route("/m/inventory/<item_id>/view")
|
||||||
def view_inventory_view(item_id):
|
def view_inventory_view(item_id):
|
||||||
|
user = read_user()
|
||||||
template = "inventory_view.html"
|
template = "inventory_view.html"
|
||||||
item = db.inventory.find_one({ "_id": ObjectId(item_id) })
|
item = db.inventory.find_one({ "_id": ObjectId(item_id) })
|
||||||
if not read_user():
|
if not user:
|
||||||
if not item["inventory"].get("public"):
|
if not item["inventory"].get("public"):
|
||||||
return do_login()
|
return do_login()
|
||||||
template = "inventory_view_public.html"
|
template = "inventory_view_public.html"
|
||||||
|
else:
|
||||||
|
can_audit = "k-space:janitors" in user["groups"]
|
||||||
bucket=get_bucket()
|
bucket=get_bucket()
|
||||||
photo_url = bucket.generate_presigned_url(
|
photo_url = bucket.generate_presigned_url(
|
||||||
ClientMethod='get_object',
|
ClientMethod='get_object',
|
||||||
|
Loading…
Reference in New Issue
Block a user