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:
Mani Chandra
2024-09-10 17:55:03 +05:30
committed by GitHub
parent 74ec3f3df3
commit 3cb0f24053
9 changed files with 195 additions and 57 deletions

View File

@ -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,