mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-03 13:30:39 +08:00
refactor(permissions): Remove permissions for utility APIs (#3730)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -48,13 +48,13 @@ impl UserFromToken {
|
||||
Ok(merchant_account)
|
||||
}
|
||||
|
||||
pub async fn get_user(&self, state: &AppState) -> UserResult<diesel_models::user::User> {
|
||||
pub async fn get_user_from_db(&self, state: &AppState) -> UserResult<UserFromStorage> {
|
||||
let user = state
|
||||
.store
|
||||
.find_user_by_id(&self.user_id)
|
||||
.await
|
||||
.change_context(UserErrors::InternalServerError)?;
|
||||
Ok(user)
|
||||
Ok(user.into())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -38,7 +38,6 @@ impl From<Permission> for user_role_api::Permission {
|
||||
Permission::MerchantAccountWrite => Self::MerchantAccountWrite,
|
||||
Permission::MerchantConnectorAccountRead => Self::MerchantConnectorAccountRead,
|
||||
Permission::MerchantConnectorAccountWrite => Self::MerchantConnectorAccountWrite,
|
||||
Permission::ForexRead => Self::ForexRead,
|
||||
Permission::RoutingRead => Self::RoutingRead,
|
||||
Permission::RoutingWrite => Self::RoutingWrite,
|
||||
Permission::DisputeRead => Self::DisputeRead,
|
||||
@ -47,8 +46,6 @@ impl From<Permission> for user_role_api::Permission {
|
||||
Permission::MandateWrite => Self::MandateWrite,
|
||||
Permission::CustomerRead => Self::CustomerRead,
|
||||
Permission::CustomerWrite => Self::CustomerWrite,
|
||||
Permission::FileRead => Self::FileRead,
|
||||
Permission::FileWrite => Self::FileWrite,
|
||||
Permission::Analytics => Self::Analytics,
|
||||
Permission::ThreeDsDecisionManagerWrite => Self::ThreeDsDecisionManagerWrite,
|
||||
Permission::ThreeDsDecisionManagerRead => Self::ThreeDsDecisionManagerRead,
|
||||
|
||||
Reference in New Issue
Block a user