Skip to content

Conversation

@pauldps
Copy link
Contributor

@pauldps pauldps commented Aug 11, 2025

No description provided.

@pauldps pauldps changed the title Library conversion Library conversion, Project Rename (DpsAuthApi) Nov 13, 2025
- Changed the permissions field in the Role model from a JSON string to a Vec<String> for direct access.
- Updated all resolvers, queries, and tests to reflect the new permissions structure.
- Removed the permissions() method and replaced it with direct access to the permissions field.
- Added a helper method to deserialize permissions from JSON when fetching roles from the database.
- Ensured all tests are updated to validate the new permissions handling.
- Updated `AuthMeResponse`, `AuthRegisterResponse`, `UserDetailsResponse`, and `UserListing` to use `UserRole` struct for role information instead of separate role ID and name fields.
- Introduced `UserWithRoleResponse` to encapsulate user details along with role information in registration responses.
- Modified database queries to fetch role permissions and structured role data.
- Updated tests to reflect changes in the GraphQL schema and response structures.
- Added new query `GetUserByNameWithRoleQuery` to retrieve user details along with role information by username.
- Ensured all relevant services and orchestrators are updated to handle the new role structure.
- Replaced direct SQL insertions with utility functions for creating test roles and users across multiple resolvers.
- Updated tests in `add_site`, `auth_change_password`, `remove_role`, `remove_site`, `role`, `roles`, `update_role`, and `update_site` to use the new utility functions for better readability and maintainability.
- Ensured that roles are created with appropriate permissions for each test case, improving the clarity of test setups.
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