Change to oidc and new foreign id format
All checks were successful
ci/woodpecker/manual/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/manual/woodpecker Pipeline was successful
This commit is contained in:
@@ -26,13 +26,14 @@ def inventory_fetch(owner=True, item_type=None):
|
||||
def wrapper(f):
|
||||
@wraps(f)
|
||||
def decorated_function(*args, **kwargs):
|
||||
user = read_user()
|
||||
d = {
|
||||
"_id": ObjectId(kwargs.pop("item_id"))
|
||||
}
|
||||
if item_type:
|
||||
d["type"] = item_type
|
||||
if owner:
|
||||
d["inventory.owner.foreign_id"] = g.user["_id"]
|
||||
d["inventory.owner.foreign_id"] = user["username"]
|
||||
kwargs["item"] = db.inventory.find_one(d)
|
||||
return f(*args, **kwargs)
|
||||
return decorated_function
|
||||
|
Reference in New Issue
Block a user