mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-27 19:46:48 +08:00
feat(user_roles): add parent group info based API to fetch permissions for user role (#9487)
This commit is contained in:
@ -36,13 +36,13 @@ pub struct RoleInfoWithGroupsResponse {
|
||||
#[derive(Debug, serde::Serialize)]
|
||||
pub struct RoleInfoWithParents {
|
||||
pub role_id: String,
|
||||
pub parent_groups: Vec<ParentGroupInfo>,
|
||||
pub parent_groups: Vec<ParentGroupDescription>,
|
||||
pub role_name: String,
|
||||
pub role_scope: RoleScope,
|
||||
}
|
||||
|
||||
#[derive(Debug, serde::Serialize)]
|
||||
pub struct ParentGroupInfo {
|
||||
pub struct ParentGroupDescription {
|
||||
pub name: ParentGroup,
|
||||
pub description: String,
|
||||
pub scopes: Vec<PermissionScope>,
|
||||
@ -74,7 +74,7 @@ pub struct RoleInfoResponseWithParentsGroup {
|
||||
pub role_id: String,
|
||||
pub role_name: String,
|
||||
pub entity_type: EntityType,
|
||||
pub parent_groups: Vec<ParentGroupInfo>,
|
||||
pub parent_groups: Vec<ParentGroupDescription>,
|
||||
pub role_scope: RoleScope,
|
||||
}
|
||||
|
||||
@ -117,3 +117,10 @@ pub enum ListRolesResponse {
|
||||
WithGroups(Vec<RoleInfoResponseNew>),
|
||||
WithParentGroups(Vec<RoleInfoResponseWithParentsGroup>),
|
||||
}
|
||||
|
||||
#[derive(Debug, serde::Serialize)]
|
||||
pub struct ParentGroupInfo {
|
||||
pub name: ParentGroup,
|
||||
pub resources: Vec<Resource>,
|
||||
pub scopes: Vec<PermissionScope>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user