Skip to content

Atom 22.0.0

Choose a tag to compare

@github-actions github-actions released this 27 Nov 08:31

Upgrade (projects must change): the /permission/* routes are gone; a user is granted the id of the /admin/* route instead. A page that called /permission/object-update, -delete, -read, -create or /permission/user-create, -update calls the same /admin/* route (/admin/object-delete takes table in the body: {"table", "ids"}). Remove config_permission_table, config_permission_user_roles and config_permission_user_column_blocked from config_extend.py (startup stops while one is set). In the data, replace the old ids in users.permissions with the admin route ids: 61 → 69 (/admin/user-create), 62 → 70 (/admin/user-update), a table's update id → 66 (/admin/object-update), its delete id → 72 (/admin/object-delete), its read id → 67 (/admin/object-read); users log in again.

  • One permission rule: the route's id. user_check_permission takes only {"mode": "token" | "realtime"} and checks the route's own config_api id in users.permissions; no action, no table map. Every /admin/* route uses it instead of user_check_role role 1 (startup refuses an admin route without it), so a role 1 user without the ids is refused, and any user granted an admin id may call that route. Admin writes check it live (realtime), so a revoked id stops the next request. Each admin id is labelled with its path in config_column_int_mapping["users"]["permissions"]. A grant is the whole route: /admin/user-update changes any user, role and permissions included, so grant it only to people trusted as admin (docs/auth-permission.md).
  • Root's permissions at every start: func_root_user_permissions_sync sets user 1's permissions to every /admin/* route id (one UPDATE, only when they differ), outside schema init, so it also runs with config_is_postgres_schema_init off.
  • Removed: router/permission.py (/permission/object-create, -read, -read-export, -update, -delete, /permission/user-create, -update), config_permission_table, config_permission_user_roles, config_permission_user_column_blocked, func_check_permission_user_role. /admin/user-create refuses the same columns as before at creation (config_column_users_my_blocked, config_column_single_update, config_column_users_blocked).
  • Fewer settings: webhook timing is fixed. config_webhook_timeout_sec (10), config_webhook_retry_max (8), config_webhook_retry_wait_sec (60, doubled each retry), config_webhook_poll_sec (5) and config_webhook_verify_tolerance_sec (300) are gone; their values are now the defaults of the webhook functions. config_webhook_is_active and config_webhook_verify_scheme stay. Startup stops if config_extend.py, .env or the environment still sets one of the five, so a value is never silently ignored (docs/webhook.md).
  • Fewer settings: two internal timers are fixed. config_inmemory_cache_cleanup_auto_sec (expired cache entries swept every 300 s) and config_schedule_check_sec (scheduled scripts checked every 600 s) are gone, with the same startup check. Settings a project, its host or its security policy may need to change stay.