Filter push notifications by user role camera access (#22385)

* filter push notifications by user camera access with cached role resolution

* simplify
This commit is contained in:
Josh Hawkins
2026-03-11 09:26:09 -05:00
committed by GitHub
parent 59fc8449ed
commit 104e623923
2 changed files with 62 additions and 11 deletions

View File

@@ -837,6 +837,7 @@ def create_user(
User.notification_tokens: [],
}
).execute()
request.app.config_publisher.publisher.publish("config/auth", None)
return JSONResponse(content={"username": body.username})
@@ -854,6 +855,7 @@ def delete_user(request: Request, username: str):
)
User.delete_by_id(username)
request.app.config_publisher.publisher.publish("config/auth", None)
return JSONResponse(content={"success": True})
@@ -973,6 +975,7 @@ async def update_role(
)
User.set_by_id(username, {User.role: body.role})
request.app.config_publisher.publisher.publish("config/auth", None)
return JSONResponse(content={"success": True})