feat(authz): Add custom role checks in authorization (#3719)

Co-authored-by: Apoorv Dixit <apoorv.dixit@juspay.in>
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Mani Chandra
2024-02-21 19:14:36 +05:30
committed by GitHub
parent 5952017260
commit ada6a32276
15 changed files with 669 additions and 148 deletions

View File

@ -1,3 +1,4 @@
use common_enums::RoleScope;
use common_utils::pii;
use crate::user::DashboardEntryResponse;
@ -7,9 +8,10 @@ pub struct ListRolesResponse(pub Vec<RoleInfoResponse>);
#[derive(Debug, serde::Serialize)]
pub struct RoleInfoResponse {
pub role_id: &'static str,
pub role_id: String,
pub permissions: Vec<Permission>,
pub role_name: &'static str,
pub role_name: String,
pub role_scope: RoleScope,
}
#[derive(Debug, serde::Deserialize, serde::Serialize)]