Spaces:
Sleeping
Sleeping
Commit History
-
forget password flow
cc73d86
-
role id fix
b81506c -
role id fix
f6063c4
-
feat(system-users): Add metadata support and enhanced user creation logging
- Add metadata field to SystemUserModel for storing additional user information (employee_user_id, employee_code, designation, etc.) - Add full_name field to CreateUserRequest schema with auto-generation from first_name and last_name - Add status field to CreateUserRequest schema with UserStatus.ACTIVE as default - Add metadata field to CreateUserRequest schema for flexible additional data - Add role_id alias to role field in CreateUserRequest for improved API compatibility - Enhance create_user service method with comprehensive debug logging at each step (username/email validation, user ID generation, password hashing, merchant type fetching, model creation, database insertion) - Implement full_name auto-generation logic when not explicitly provided - Add metadata propagation from request to stored user model - Improve observability with structured logging including correlation data (merchant_id, merchant_type, collection name)512572c
-
changed user_id as UUID
vanitha5fdb9fd
-
feat: Implement forgot password feature with email reset functionality
- Added `FORGOT_PASSWORD_QUICKSTART.md` for quick reference on setup and usage. - Created `IMPLEMENTATION_SUMMARY.md` detailing the implementation process and features. - Introduced new API endpoints for password reset: `/auth/forgot-password`, `/auth/verify-reset-token`, and `/auth/reset-password`. - Developed email service in `app/utils/email_service.py` for sending transactional emails. - Updated configuration in `app/core/config.py` to include password reset settings. - Enhanced user service in `app/system_users/services/service.py` to handle password reset token creation, verification, and email sending. - Added schemas for password reset requests in `app/system_users/schemas/schema.py`. - Implemented token storage and management in `app/system_users/models/model.py`. - Created a test script `test_forgot_password.py` to validate the complete password reset flow. - Included troubleshooting and security features in documentation.96e0270 -
added fullname and removed metdata from login response
vanitha6939a48
-
docs(merchant_type): Standardize merchant type references to lowercase
- Update MERCHANT_TYPE_IMPLEMENTATION.md to use lowercase `ncnf` instead of `NCNF` - Update model field descriptions in SystemUserModel to reference lowercase merchant types - Update schema field descriptions in CreateUserRequest to reference lowercase merchant types - Update router endpoint documentation to reference lowercase merchant types - Update initial user creation script to use lowercase `ncnf` for merchant_type values - Update demo script to use lowercase `ncnf` in merchant type filtering - Update test script to use lowercase `ncnf` in merchant type filtering - Ensures consistency across all merchant type references throughout the codebased74c068 -
docs(merchant_type): Update merchant type references from salon to retail and NCNF
- Update supported merchant types documentation from `national_cnf`, `cnf`, `distributor`, `salon` to `NCNF`, `cnf`, `distributor`, `retail` - Replace all `salon` references with `retail` across documentation and example code - Update role mapping from `role_salon_owner` to `role_retail_owner` in SCM permissions integration - Update example payloads and API documentation to use retail merchant type - Update model field descriptions and schema examples to reflect new merchant type values - Update test data and demo scripts to use retail instead of salon - Standardize merchant type naming conventions across all internal schemas and API endpoints349a6d0
-
refactor(models): make first_name optional in SystemUserModel
To align with the optional nature of last_name and phone fields, first_name is now also optional. This provides more flexibility when creating user records where first name might not be required.d990a6b
-
feat(system_users): Add merchant_type field and list endpoint with projection support
- Add `merchant_type` field to SystemUserModel for merchant categorization - Implement automatic merchant_type detection from SCM service during user creation - Add optional `merchant_type` parameter to CreateUserRequest schema - Include `merchant_type` and `merchant_id` in UserInfoResponse schema - Create new `POST /auth/users/list` endpoint with projection support following API standards - Implement `list_users_with_projection()` service method with filtering by merchant_type, role, status, and merchant_id - Add `get_merchant_info()` service method to fetch merchant data from SCM service with fallback to database - Create comprehensive documentation in MERCHANT_TYPE_IMPLEMENTATION.md with usage examples and benefits - Add test script `test_system_users_with_merchant_type.py` for API validation - Add demo script `demo_merchant_type_users.py` for interactive testing - Update `create_initial_users.py` to support merchant_type initialization - Enable 50-90% response size reduction throug…a581666
-
feat(system_users): Add merchant_id field to user model and authentication tokens
- Add merchant_id field to SystemUserModel to track user's associated merchant - Include merchant_id in JWT token payload for both auth and system_users login endpoints - Update CreateUserRequest schema to require merchant_id during user creation - Populate merchant_id when creating new users in service layer - Initialize all default users with merchant_id in database setup script - Fix refresh_token endpoint to return new_access_token instead of stale access_token - Standardize token payload structure across auth endpoints to include merchant_id - Update initial user creation logs to display merchant information and correct passwords8cd913e
-
feat: implement user migration and update role handling in database initialization
eb862e9 -
refactor: update user role handling to use string identifiers instead of enum values
7e4a9fd -
user roles changes
8a8d7ba
-
feat: Implement System Users module for authentication and user management
- Added `system_users` package with controllers, models, schemas, and services. - Created API endpoints for user login, registration, user management, and password change. - Implemented JWT authentication and user role management. - Added database management utilities for creating indexes and default roles. - Updated requirements.txt with necessary dependencies for FastAPI, MongoDB, and JWT handling. - Created a startup script to set up the environment and run the FastAPI server.7a5b513