Skip to content

Access Control

Thomas Pollet edited this page Mar 8, 2026 · 21 revisions

Security and Access Control

Security model overview

SAFRS does not impose a single security model. Instead, it gives you several control points:

  • app-wide middleware or framework auth
  • model-level decorators
  • relationship-level controls
  • permission hooks such as _s_check_perm

Model and relationship controls

Relevant mechanisms include:

  • decorators
  • custom_decorators
  • relationship-level decorators
  • relationship-level http_methods
  • _s_check_perm

FastAPI note

For FastAPI, prefer dependencies and middleware rather than Flask-only decorator patterns.

Example files

Clone this wiki locally