This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/website/docs/expressions/_user.md
CRoudsarabi 0f56d00959
website/docs: added example for custom user attributes (#2406)
* added example for custom user attributes

* simplified example

Co-authored-by: croudsarabi <constantin.roudsarabi@andrena.de>
2022-03-15 18:12:02 +01:00

250 B

  • user: The current user. This may be None if there is no contextual user. See (User)

Example:

return {
  "custom_attribute": request.user.attributes.get("custom_attribute", "default"),
}