Issue:
feat: change list roles, get role, info api to respond with groups

Resolution:
<think>
PR Context:
- Title: feat(roles): Change list roles, get role and authorization info api to respond with groups
- Merged: 2024-02-27T13:11:55Z
- Files changed: 13 files
- Commits: 9 commits

Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD

## Description
<!-- Describe your changes in detail -->
Change `list_roles`, `get_role` and `get_authorization_info` api to respond with groups if asked.

### Additional Changes

- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies applicat
</think>

To implement this, you'll need to modify:


**Detailed Implementation:**


**Commit 1:** feat(roles): Change list roles, get role and authorization info api to respond with groups (#3837)
C
Files to modify:


**crates/api_models/src/events/user_role.rs**
  Modify existing code

**crates/api_models/src/user_role.rs**
  Remove:
    - struct: pub::AuthorizationInfoResponse
  Add:
    - struct: pub::AuthorizationInfoResponse
    - struct: pub::GroupInfo
    - enum: pub::AuthorizationInfo

**crates/api_models/src/user_role/role.rs**
  Remove:
    - struct: pub::RoleInfoResponse
  Add:
    - struct: pub::GetGroupsQueryParam
    - struct: pub::RoleInfoWithPermissionsResponse
    - struct: pub::RoleInfoWithGroupsResponse
    - enum: pub::RoleInfoResponse

**crates/common_enums/src/enums.rs**
  Modify existing code

**crates/router/src/core/user.rs**
  Modify existing code

**crates/router/src/core/user_role.rs**
  Modify existing code

**crates/router/src/core/user_role/role.rs**
  Modify existing code

**crates/router/src/routes/user_role.rs**
  Modify existing code

**crates/router/src/services/authorization.rs**
  Modify existing code

**crates/router/src/services/authorization/info.rs**
  Remove:
    - struct: pub::PermissionInfo

**crates/router/src/services/authorization/roles.rs**
  Modify existing code

**crates/router/src/types/domain/user.rs**
  Remove:
    - function: private::from
    - impl: impl From<info::PermissionInfo> for user_role_api::PermissionInfo

**crates/router/src/utils/user.rs**
  Modify existing code