Users & Permissions models
Column and nullable values apply to fields stored on the model's table.
ApiKey
bloomerp.models.api.api_key.ApiKey
Database table bloomerp_api_key
| Field | Type | Column | Nullable | Description |
|---|---|---|---|---|
id | UUIDField | id | No | — |
datetime_created | DateTimeField | datetime_created | No | — |
datetime_updated | DateTimeField | datetime_updated | No | — |
created_by | UserField to bloomerp.User | created_by_id | Yes | — |
updated_by | UserField to bloomerp.User | updated_by_id | Yes | — |
account | ForeignKey to bloomerp.User | account_id | No | The account whose permissions this API key uses. |
name | CharField | name | No | A human-readable label for this API key. |
key_prefix | CharField | key_prefix | No | Visible token prefix used to identify the API key without storing the raw token. |
key_hash | CharField | key_hash | No | Hashed API key secret. The raw token is only shown when it is created. |
last_used_at | DateTimeField | last_used_at | Yes | — |
expires_at | DateTimeField | expires_at | Yes | — |
revoked_at | DateTimeField | revoked_at | Yes | — |
files | GenericRelation to bloomerp.FileReference | — | — | — |
comments | GenericRelation to bloomerp.Comment | — | — | — |
object_labels | BloomerpLabelsField | — | — | — |
User
bloomerp.models.users.user.User
Database table auth_user
| Field | Type | Column | Nullable | Description |
|---|---|---|---|---|
id | BigAutoField | id | No | — |
password | CharField | password | No | — |
last_login | DateTimeField | last_login | Yes | — |
is_superuser | BooleanField | is_superuser | No | Designates that this user has all permissions without explicitly assigning them. |
username | CharField | username | No | Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. |
first_name | CharField | first_name | No | — |
last_name | CharField | last_name | No | — |
email | EmailField | email | No | — |
is_staff | BooleanField | is_staff | No | Designates whether the user can log into this admin site. |
is_active | BooleanField | is_active | No | Designates whether this user should be treated as active. Unselect this instead of deleting accounts. |
date_joined | DateTimeField | date_joined | No | — |
avatar | ImageField | avatar | Yes | — |
default_email_account | ForeignKey to bloomerp.EmailAccount | default_email_account_id | Yes | Preferred sender when composing outside an inbox. |
date_view_preference | CharField | date_view_preference | No | The date format to be used in the application |
datetime_view_preference | CharField | datetime_view_preference | No | The datetime format to be used in the application |
detail_sidebar_view_preference | CharField | detail_sidebar_view_preference | No | The detail view sidebar panel to show first |
groups | ManyToManyField to auth.Group | — | — | The groups this user belongs to. A user will get all permissions granted to each of their groups. |
user_permissions | ManyToManyField to auth.Permission | — | — | Specific permissions for this user. |
UserObjectLayoutPreference
bloomerp.models.users.user_object_layout_preference.UserObjectLayoutPreference
Model to store user preferences for object layouts.
Database table bloomerp_userobjectlayoutpreference
| Field | Type | Column | Nullable | Description |
|---|---|---|---|---|
id | BigAutoField | id | No | — |
layout | JSONField | layout | No | — |
name | CharField | name | No | Optional name for this preference, for user reference |
user | ForeignKey to bloomerp.User | user_id | No | — |
selected | BooleanField | selected | No | Indicates if this preference is currently selected for the user. Only one preference per user can be selected at a time. |
source_object | ForeignKey to bloomerp.UserObjectLayoutPreference | source_object_id | Yes | Reference to the original preference from which this preference was derived. This is used to track the origin of derived preferences. |
initial_default | BooleanField | initial_default | No | Indicates if this preference is the initial default for the user. This is used to determine the user's default preference when they first create an account. |
content_type | ForeignKey to contenttypes.ContentType | content_type_id | No | — |
shared_with_users | ManyToManyField to bloomerp.User | — | — | Users with whom this preference is shared. |
shared_with_groups | ManyToManyField to auth.Group | — | — | Groups with whom this preference is shared. |
