-
Notifications
You must be signed in to change notification settings - Fork 1
users
The data-primals-engine includes a robust user management system, allowing you to control access to your data and functionalities. The core of this system is the user model, which stores all necessary information about platform users.
The user model is a fundamental, system-locked model that defines the attributes of each user account.
-
username(string, required, unique): The unique identifier for the user, used for login. -
password(password): The user's hashed password. -
gender(enum): Optional field for gender, with options likemale,female,other,prefer_not_to_say. -
contact(relation tocontactmodel): Links to acontactdocument, which can store detailed personal information likefirstName,lastName,email, andphone. -
roles(multiple relation torolemodel): Assigns one or more roles to the user, determining their permissions within the system. -
lang(relation tolangmodel): Specifies the preferred language for the user interface and content. -
profilePicture(file): Allows users to upload a profile image (supports JPEG and PNG). -
tokens(multiple relation totokenmodel): Stores authentication tokens associated with the user.
The engine provides mechanisms for user authentication, typically involving username/password credentials to issue JWT (JSON Web Tokens). These tokens are then used to secure API requests, ensuring that only authorized users can access or modify data.
Each document created within the data-primals-engine is associated with a user via the _user field. This ensures data isolation and allows for granular access control, where users primarily interact with data they own or have been granted access to.
Effective user management is crucial for maintaining security and organizing access within your data-primals-engine application.
Next: Roles and Permissions