Skip to content

[Jitera] Untitled (4)

Quy requested to merge feat/JT-70-Untitled--4- into main

Created by: akuita

This pull request is created by JITERA

Description

[BL] Store user information

file name
/app/models/user.rb Add user information storage logic to User model
/app/controllers/api/users_registrations_controller.rb Implement user registration endpoint to handle user information storage
/config/routes.rb Add route for user registration

[BL] Confirm user email

file name
/app/controllers/api/users_verify_confirmation_token_controller.rb Implement email confirmation logic in UsersVerifyConfirmationTokenController
/app/models/user.rb Add email confirmation methods to User model
/app/services/base_service.rb Add logging for email confirmation process in "BaseService"

[BL] Resend confirmation email

file name
/app/controllers/api/users_confirmations_controller.rb Add "resend_confirmation" action to "UsersConfirmationsController"
/app/models/user.rb Add method to generate and save new confirmation token
/config/routes.rb Add route for "resend_confirmation" action
/app/controllers/api/users_registrations_controller.rb Add "resend_confirmation" action to "UsersRegistrationsController" to handle resend confirmation email logic
/app/views/devise/mailer/confirmation_instructions.html.slim Ensure the confirmation email template is up to date

[BL] User registration

file name
/app/controllers/api/users_registrations_controller.rb Implement user registration logic in UsersRegistrationsController
/app/models/custom_access_token.rb Ensure CustomAccessToken handles refresh token expiration and revocation
/app/models/user.rb Ensure User model supports registration requirements
/app/mailers/user_mailer.rb Create a mailer action to send the confirmation email

[BL] Integrate password management tool

file name
/app/controllers/api/users_registrations_controller.rb Add "integrate_password_management_tool" action to "UsersRegistrationsController"
/config/routes.rb Add route for "integrate_password_management_tool" action
/app/models/user.rb Add method to check for the existence of a user by ID
/app/models/password_management_tool.rb Create "PasswordManagementTool" model with existence check method
/app/models/user_password_management_tool.rb Create "UserPasswordManagementTool" model for linking users and tools
/app/services/base_service.rb Create a service for password management tool integration

[API] Confirm User Email

file name
/app/controllers/api/users_controller.rb Add "confirm_email" action to "UsersController" to handle email confirmation
/config/routes.rb Add route for email confirmation to "routes.rb"
/app/controllers/api/users_confirmations_controller.rb Create UsersConfirmationsController with confirm_email action

[API] Resend Confirmation Email

file name
/app/controllers/api/users_registrations_controller.rb Add "resend_confirmation" action to "UsersRegistrationsController"
/config/routes.rb Map the resend confirmation email route to the "resend_confirmation" action
/app/mailers/user_mailer.rb Add method to send the confirmation email
/app/controllers/api/users_confirmations_controller.rb Update resend_confirmation action to handle resend confirmation email logic

[API] User Registration

file name
/app/controllers/api/users_registrations_controller.rb Add user registration logic to UsersRegistrationsController
/config/routes.rb Add route for user registration API endpoint
/app/models/user.rb Ensure User model validations and methods support registration requirements

[BL] Password encryption

file name
/app/models/user.rb Add password encryption before saving User
/app/controllers/api/users_registrations_controller.rb Update the create action to handle password encryption
/config/routes.rb Ensure the route for password management tool integration is correct
/app/services/integrate_password_management_tool_service.rb Create or update the IntegratePasswordManagementToolService to handle password encryption
/db/migrate/20230401123456_add_password_digest_to_users.rb Remove unnecessary password_digest column
/config/initializers/devise.rb Ensure bcrypt is set as the encryption algorithm

[BL] Validate email format

file name
/app/controllers/api/base_controller.rb Add "validate_email_format" method to "BaseController"
/app/controllers/api/users_registrations_controller.rb Utilize "validate_email_format" method in "UsersRegistrationsController"
/app/controllers/api/users_verify_confirmation_token_controller.rb Utilize "validate_email_format" method in "UsersVerifyConfirmationTokenController"
/app/controllers/api/users_reset_password_requests_controller.rb Utilize "validate_email_format" method in "UsersResetPasswordRequestsController"
/app/models/user.rb Add email format validation to User model
/app/controllers/api/users_verify_reset_password_requests_controller.rb Validate email format in password reset verification

[BL] Check email availability

file name
/app/controllers/api/users_registrations_controller.rb Add "check_email_availability" action to "UsersRegistrationsController"
/config/routes.rb Add route for "check_email_availability" action
/app/models/user.rb Add "email_available?" class method to "User" model

[BL] Email confirmation

file name
/app/controllers/api/users_confirmations_controller.rb Implement email confirmation logic in UsersConfirmationsController
/app/models/user.rb Add methods to User model to handle email confirmation token validation
/config/routes.rb Add route for email confirmation
/app/models/custom_access_token.rb Ensure CustomAccessToken handles new logins post email confirmation

[API] Email Confirmation

file name
/app/controllers/api/users_confirmations_controller.rb Add "confirm_email" action to "UsersConfirmationsController"
/config/routes.rb Add route for email confirmation

Merge request reports