Skip to content

Dev#6

Merged
islamghany merged 7 commits intomainfrom
dev
Nov 1, 2025
Merged

Dev#6
islamghany merged 7 commits intomainfrom
dev

Conversation

@islamghany
Copy link
Copy Markdown
Owner

No description provided.

…e in the learning roadmap, enhance server initialization with user context handling, and add user context management in the model for improved user data access in requests.
…rs, routes, and DTOs, to streamline the codebase and improve maintainability.
- Introduced a new 'role' field in the User model to support role-based access control (RBAC).
- Updated database schema with migrations to add the 'role' column and associated constraints.
- Enhanced user-related queries and services to handle the new 'role' attribute.
- Implemented middleware for role verification, including admin and moderator checks.
- Added a new admin route to the server for admin-specific actions, ensuring proper authorization checks.
…gement

- Introduced a 'Role' field in TokenParams and Payload structures to support role-based access control.
- Updated the CreateToken function to include the new role attribute in the generated JWT token.
- Introduced a new RegisterInput struct for user registration, including fields for email, username, password, confirm password, and role.
- Implemented the Register handler to process user registration requests, including error handling for duplicate email and username.
- Updated routing to include a new endpoint for user registration.
- Added password strength validation to enhance security during user creation.
…wnership implementation, password strength validation, and adherence to OWASP security best practices.
@islamghany
Copy link
Copy Markdown
Owner Author

owasp

@islamghany islamghany merged commit f916831 into main Nov 1, 2025
4 of 5 checks passed
ID: payload.UserID,
Email: payload.Email,
Username: payload.Username,
TokenVersion: int32(payload.Version),

Check failure

Code scanning / gosec

integer overflow conversion int -> int32 Error

integer overflow conversion int -> int32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants