Backup current agri_seedling application
This commit is contained in:
@@ -132,6 +132,15 @@ has_permission = {
|
||||
# "Field Worker" role; see agri_seedling/utils/auth.py
|
||||
on_session_creation = "agri_seedling.agri_seedling.utils.auth.set_field_worker_session_expiry"
|
||||
|
||||
|
||||
# Before Request — X-Worker-Token auth hook for mobile field-worker app
|
||||
# ---------------------------------------------------------------------------
|
||||
# Validates the X-Worker-Token header on every request and upgrades the session
|
||||
# from Guest to the proxy user so whitelisted API methods can execute.
|
||||
before_request = [
|
||||
"agri_seedling.agri_seedling.auth_hooks.authenticate_worker_token",
|
||||
]
|
||||
|
||||
# Website Route Rules (kept minimal — mobile app is the field-worker client)
|
||||
# ---------------------------------------------------------------------------
|
||||
website_route_rules = []
|
||||
|
||||
Reference in New Issue
Block a user