mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 04:04:43 +08:00
feat(users): New profile level roles (#5843)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -2652,6 +2652,7 @@ pub async fn create_connector(
|
||||
state: SessionState,
|
||||
req: api::MerchantConnectorCreate,
|
||||
merchant_account: domain::MerchantAccount,
|
||||
auth_profile_id: Option<id_type::ProfileId>,
|
||||
key_store: domain::MerchantKeyStore,
|
||||
) -> RouterResponse<api_models::admin::MerchantConnectorResponse> {
|
||||
let store = state.store.as_ref();
|
||||
@ -2683,6 +2684,8 @@ pub async fn create_connector(
|
||||
.validate_and_get_business_profile(&merchant_account, store, key_manager_state, &key_store)
|
||||
.await?;
|
||||
|
||||
core_utils::validate_profile_id_from_auth_layer(auth_profile_id, &business_profile)?;
|
||||
|
||||
let pm_auth_config_validation = PMAuthConfigValidation {
|
||||
connector_type: &req.connector_type,
|
||||
pm_auth_config: &req.pm_auth_config,
|
||||
|
||||
Reference in New Issue
Block a user