-
Notifications
You must be signed in to change notification settings - Fork 2
Specs M0 Accounts User
accounts.models.user.User
Represents a user of the Cairn platform.
| Field | Type | Constraints | Description |
|---|---|---|---|
id |
UUID | PK, auto-generated | Unique identifier |
email |
string | required, unique, email format | Email address (sign-in identifier) |
first_name |
string | required, max 150 | First name |
last_name |
string | required, max 150 | Last name |
display_name |
string | computed or overridden, max 255 | Display name (first_name last_name by default) |
job_title |
string | optional, max 255 | Job title / position |
department |
string | optional, max 255 | Division / department |
phone |
string | optional, max 50 | Phone number |
avatar |
image | optional | Profile picture |
password |
string | required, hashed | Password (bcrypt/argon2) |
is_active |
boolean | required, default true | Active account |
is_staff |
boolean | required, default false | Access to the Django administration interface |
groups |
relation | M2M → Group | Membership groups |
language |
enum | required, default fr
|
Preferred interface language (fr, en) |
timezone |
string | required, default Europe/Paris
|
Time zone |
theme_preference |
enum | required, default system
|
Preferred display theme (light, dark, system). system follows the operating system preference via prefers-color-scheme and reacts to its changes in real time. The preference is rendered server-side (data-theme-preference attribute on <html>) to avoid any incorrect theme flash on load, with a localStorage fallback then prefers-color-scheme for unauthenticated pages (login, OAuth authorize) |
notification_preferences |
json | optional | Notification preferences (email, in-app) |
last_login |
datetime | auto | Last sign-in date |
password_changed_at |
datetime | auto | Date of the last password change |
failed_login_attempts |
integer | auto, default 0 | Number of consecutive failed login attempts |
locked_until |
datetime | optional | Account lock end date |
created_by |
relation | FK → User, optional | Account creator (null if self-registration) |
created_at |
datetime | auto | Creation date |
updated_at |
datetime | auto | Last modification date |
Note: The
usernamefield.
A user can be provisioned without a password (needed for programmatic imports that must reference an owner / reviewer). The MCP tool create_user and the API endpoint POST /api/v1/users/invite/ (both gated by system.users.create) create the account with an unusable password and return a single-use activation_url. The invitee opens that link (/accounts/activate/<uidb64>/<token>/, unauthenticated) to set their first credential; setting it invalidates the token. Roles are assigned by group name at creation. The invitation is recorded in the access log (user_invited), and the activation as account_activated. No plaintext password ever crosses the API / MCP boundary.
Built from docs/ at v0.36.0. Edits made here are overwritten by the next release : open a pull request against the source instead.
- Administration
- Ask Cairn
- Assets and suppliers
- Compliance
- The dashboard
- Finding your way
- Getting started
- Incidents
- How records move
- Organisational context
- Reports and management review
- Risks
- Trust Center
- Architecture
- Configuration
- Contributing
- The documentation system
- Installation
- Internationalisation
- Operations
- Release process
- Security
- Testing
- Adding an assistant provider
- Adding a dashboard widget
- Adding a domain entity
- Declaring a lifecycle
- Adding an MCP tool
- Adding a REST endpoint
- Adding a report
- Interface conventions
- Dashboard widgets
- Lifecycles
- MCP tools
- MCP tool parameters : Assets
- MCP tool parameters : Compliance
- MCP tool parameters : Governance and context
- MCP tool parameters : General
- MCP tool parameters : Incidents
- MCP tool parameters : Reports and management review
- MCP tool parameters : Risks
- MCP tool parameters : System and administration
- MCP tool parameters : Trust Center
- Management commands
- Models
- Permissions
- REST endpoints
- Environment variables
- MCP server
- REST API
- Assistant module (Ask Cairn)
- Module 0: User Management and Access Control
- Module 1: Context and Organization
- Module 2: Asset Management
- Module 3: Compliance
- Module 4: Risk Management
- Module 4 bis - EBIOS Risk Manager
- Module 5 : Trust Center
- Module 6 : Security Incident Management
- Management review : ISO 27001:2022 compliance (clause 9.3)