Commit Graph
265 Commits
Author SHA1 Message Date
MythEclipse 1bb2d6a419 feat: Add Administrator permission to seeding process and ensure permissions are seeded even when other seeds are skipped 2025-09-26 01:35:06 +07:00
MythEclipse 14690a378f feat: Allow access for users with Administrator permission in permissions guard 2025-09-26 01:30:00 +07:00
MythEclipse 17cc4ccdba refactor: Update permissions handling to filter out None values and ensure safe access 2025-09-26 01:08:18 +07:00
MythEclipse 1b7368a4b7 feat: Add Administrator permission and update permissions handling for roles and users 2025-09-26 00:45:57 +07:00
MythEclipse ff2e14d5f9 feat: Introduce Administrator permission and update permissions checks for access control 2025-09-25 23:47:29 +07:00
MythEclipse 012aff60ef refactor: Update admin team routes to remove versioning and avoid conflicts 2025-09-25 23:28:37 +07:00
MythEclipse f3d88e2ac9 Add comprehensive tests for Gacha Credits, Auth, and User services
- Implement tests for GachaCreditsService including creation, retrieval, updating, and deletion of gacha credits.
- Add tests for AuthController covering user login, registration, email verification, and error handling for invalid credentials.
- Enhance AuthService tests to include login, registration, email verification, OTP resend, password reset, and token refresh functionalities.
- Create tests for UsersService to validate user creation, retrieval, updating, deletion, and fetching by email.
- Ensure all tests utilize a consistent setup and teardown process for database interactions.
2025-09-25 22:53:26 +07:00
MythEclipse 0e48b6755f refactor: Remove unused execute_safe_count_query import from teams_repository 2025-09-25 22:07:38 +07:00
MythEclipse 7056f8c8a6 Add comprehensive tests for IAM permissions, roles, teams, and users
- Implemented unit tests for PermissionsController and PermissionsService, covering create, read, update, and delete operations.
- Added tests for RolesController and RolesService, including handling of duplicates and retrieval by ID.
- Developed tests for TeamsController, including creation, retrieval, updating, deletion, and search functionality.
- Created tests for UsersController, ensuring user creation and validation of attributes.
- Each test includes setup, execution, and cleanup to maintain database integrity.
2025-09-25 22:06:21 +07:00
MythEclipse 4ecdcd12d2 feat: Add administrator permissions to PermissionsEnum and update related team management functionality 2025-09-25 20:57:31 +07:00
MythEclipse dd4a73e360 feat: Add comprehensive admin team management functionality with new permissions and endpoints 2025-09-25 20:28:08 +07:00
MythEclipse 49e0a89ad1 feat: Enhance team management and permissions structure with detailed DTOs and service methods 2025-09-25 20:18:16 +07:00
MythEclipse 82b85abe8f a 2025-09-25 17:29:17 +07:00
MythEclipse df11aa5eb8 a 2025-09-25 17:26:39 +07:00
MythEclipse ac44867ec1 feat: Add member team management functionality with detailed DTOs and service methods 2025-09-22 17:38:54 +07:00
MythEclipse 7205afe43b feat: Implement admin team management endpoints with permissions and DTOs 2025-09-22 17:25:02 +07:00
MythEclipse b1c678c72b feat: Add public team listing and detail endpoints with DTOs for public access 2025-09-22 17:07:14 +07:00
MythEclipse fa3687c6be feat: Add team-related DTOs and update routes for team management 2025-09-22 16:55:03 +07:00
MythEclipse ba46a19a5a refactor: Replace surrealdb_helpers with integrated query builder methods for improved clarity and functionality 2025-09-22 16:38:07 +07:00
MythEclipse 8cdbca24ba feat: Enhance query builder with new condition methods and safe query execution 2025-09-22 16:09:22 +07:00
MythEclipse 8f981572cd feat: Introduce surrealdb_helpers for query building and execution utilities 2025-09-22 15:06:37 +07:00
MythEclipse 39b75f410f Add unit tests for TeamsRepository and TeamsService
- Implement tests for team creation, retrieval, updating, and deletion in TeamsRepository.
- Add tests for team member management including adding and removing members.
- Create tests for team invitations and searching teams.
- Ensure proper cleanup of test data after each test case.
- Validate unauthorized operations for team management.
2025-09-22 14:59:38 +07:00
MythEclipse 6da1b2a7e7 refactor: Replace make_thing with make_thing_from_enum for consistency and clarity across multiple modules 2025-09-22 09:10:20 +07:00
MythEclipse acccae9f7c fix: Correct typo in FAILED_TESTS_SUMMARY variable and enhance HTTP status code handling in API tests 2025-09-22 08:21:21 +07:00
MythEclipse e7c17784cc feat: Simplify token generation by removing unnecessary permissions parameter from access and refresh token functions 2025-09-22 07:52:00 +07:00
Maulana SodiqinandGitHub 042e0b4eff Merge pull request #45 from IMPHNEN/feat/auth-google
Feat/auth google
2025-08-17 18:26:24 +07:00
MythEclipse 0b51a56dee feat: Enhance CORS middleware to dynamically include development port and allow OPTIONS method 2025-08-17 16:06:21 +07:00
MythEclipse cb98440b65 feat: Refactor update_user_avatar method to be static and enhance avatar deletion logic 2025-08-17 15:22:15 +07:00
MythEclipse 3c19d262f3 feat: Increase CSRF token maximum age to 30 minutes and enhance logging for token generation 2025-08-17 15:08:58 +07:00
MythEclipse bdffe85544 Update dependencies and refactor OAuth service
- Updated various dependencies in Cargo.toml to their latest versions for improved performance and security.
- Refactored the Google OAuth service to streamline the creation of the OAuth client and improve code readability.
- Changed the way WebSocket messages are sent in clear_db_test.rs to use `into()` for better type handling.
- Enhanced error handling and logging in the Google OAuth callback method.
2025-08-16 19:10:27 +07:00
MythEclipse 9ed619e3fd feat: Optimize password verification by using blocking tasks for improved performance 2025-08-16 13:47:29 +07:00
MythEclipse 00fd7e1907 feat: Refactor password hashing and JWT encoding to use static keys for improved performance and security 2025-08-16 13:43:18 +07:00
MythEclipse b70126734e feat: Refactor password reset flow to use async processing and improve token validation 2025-08-16 13:38:35 +07:00
MythEclipse 6af9461079 a 2025-08-16 13:22:39 +07:00
MythEclipse 57b3662951 feat: Refactor auth service and middleware for improved user data handling and caching 2025-08-16 13:18:55 +07:00
MythEclipse c0c08f2821 Enhance Users Service and DTOs
- Added Default trait to UsersDetailItemDto for easier instantiation.
- Refactored UsersServiceTrait to use Pin<Box<dyn Future<...>> for async functions, improving compatibility with async/await.
- Updated all service methods to return futures instead of using async_trait.
- Improved error handling and logging in upload_file method, ensuring proper handling of multipart data.
- Masked sensitive information in Env struct's Debug implementation for better security in logs.
- Cleaned up Cargo.toml by removing unnecessary async-trait workspace dependency.
2025-08-16 12:48:24 +07:00
MythEclipse 8402415649 feat: Enhance user permissions and update event handling with improved response structures 2025-08-15 00:32:15 +07:00
MythEclipse 01e20baa45 feat: Add axum-extra dependency and refactor auth middleware for improved token handling 2025-08-14 23:16:41 +07:00
MythEclipse 10dc869eaf feat: Enhance permissions and roles management with improved indexing and state handling 2025-08-14 23:11:44 +07:00
MythEclipse 199d0c885e feat: Add axum-extra dependency and implement typed headers
feat: Define unique index on users table for email and fix minor syntax error

refactor: Update permissions_guard to use claims from JWT and improve user retrieval

refactor: Modify user-related service methods to accept user details directly

fix: Update token generation functions to include user ID and permissions

test: Update Google OAuth flow tests to reflect changes in token generation
2025-08-14 22:46:42 +07:00
MythEclipse 89ef48a57e feat: Update permissions for user and gacha claim access 2025-08-14 21:38:47 +07:00
MythEclipse da1826ebba feat: Add file upload with deduplication to MinIO service 2025-08-14 17:03:23 +07:00
MythEclipse 874986f1d6 feat: Implement file upload functionality with MinIO integration
- Added new dependencies for HMAC, hex, and urlencoding in Cargo.toml.
- Introduced FileUploadSchema for handling multipart file uploads.
- Enhanced UsersService with upload_file method to handle file uploads to MinIO.
- Implemented MinioService for managing MinIO interactions, including file uploads and presigned URL generation.
- Updated environment configuration to include MinIO region and secure settings.
- Added validation for file types and sizes during upload.
- Improved error handling and logging for file upload processes.
- Created utility functions for base64 decoding and content type extraction.
2025-08-14 16:53:14 +07:00
MythEclipse bbff555a06 feat(docs): add upload_file endpoint to OpenAPI documentation 2025-08-14 14:16:07 +07:00
Asep Haryana Saputra d3eb687a58 Merge branch 'feat/auth-google' of https://github.com/IMPHNEN/imphnen-backend-service into feat/auth-google 2025-08-14 06:55:26 +00:00
Asep Haryana Saputra c5516d4006 a 2025-08-14 06:54:56 +00:00
MythEclipse 5f51dd281d feat: update dependencies and add MinIO integration
- Updated `async-channel` to version 2.5.0 and added new dependencies in `Cargo.lock`.
- Introduced `minio` crate for file upload functionality.
- Added `career_status` field to user-related DTOs and schemas.
- Implemented file upload endpoint in `users_controller.rs` with multipart support.
- Created `MinioService` for handling file uploads to MinIO.
- Updated user seeding and test cases to accommodate new `career_status` field.
- Refactored permissions guard to return user details.
2025-08-14 13:16:39 +07:00
MythEclipse f6232832af feat(users): Enhance user schema and DTOs with additional fields for website, social links, location, skills, experience, and education 2025-08-13 20:40:02 +07:00
MythEclipse 277cf0770d feat(auth): Add GOOGLE_REDIRECT_URL to .env.example for Google OAuth callback 2025-08-13 01:29:41 +07:00
MythEclipse 650728a385 feat(auth): Update Google OAuth service to support custom redirect URIs 2025-08-12 23:21:34 +07:00