mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 01:57:45 +08:00 
			
		
		
		
	fix(user): change permission for sample data (#3462)
This commit is contained in:
		| @ -179,7 +179,6 @@ impl From<Flow> for ApiIdentifier { | |||||||
|             | Flow::ResetPassword |             | Flow::ResetPassword | ||||||
|             | Flow::InviteUser |             | Flow::InviteUser | ||||||
|             | Flow::InviteMultipleUser |             | Flow::InviteMultipleUser | ||||||
|             | Flow::DeleteUser |  | ||||||
|             | Flow::UserSignUpWithMerchantId |             | Flow::UserSignUpWithMerchantId | ||||||
|             | Flow::VerifyEmailWithoutInviteChecks |             | Flow::VerifyEmailWithoutInviteChecks | ||||||
|             | Flow::VerifyEmail |             | Flow::VerifyEmail | ||||||
| @ -191,7 +190,8 @@ impl From<Flow> for ApiIdentifier { | |||||||
|             | Flow::GetRoleFromToken |             | Flow::GetRoleFromToken | ||||||
|             | Flow::UpdateUserRole |             | Flow::UpdateUserRole | ||||||
|             | Flow::GetAuthorizationInfo |             | Flow::GetAuthorizationInfo | ||||||
|             | Flow::AcceptInvitation => Self::UserRole, |             | Flow::AcceptInvitation | ||||||
|  |             | Flow::DeleteUserRole => Self::UserRole, | ||||||
|  |  | ||||||
|             Flow::GetActionUrl | Flow::SyncOnboardingStatus | Flow::ResetTrackingId => { |             Flow::GetActionUrl | Flow::SyncOnboardingStatus | Flow::ResetTrackingId => { | ||||||
|                 Self::ConnectorOnboarding |                 Self::ConnectorOnboarding | ||||||
|  | |||||||
| @ -257,7 +257,7 @@ pub async fn generate_sample_data( | |||||||
|         &http_req, |         &http_req, | ||||||
|         payload.into_inner(), |         payload.into_inner(), | ||||||
|         sample_data::generate_sample_data_for_user, |         sample_data::generate_sample_data_for_user, | ||||||
|         &auth::JWTAuth(Permission::MerchantAccountWrite), |         &auth::JWTAuth(Permission::PaymentWrite), | ||||||
|         api_locking::LockAction::NotApplicable, |         api_locking::LockAction::NotApplicable, | ||||||
|     )) |     )) | ||||||
|     .await |     .await | ||||||
| @ -277,7 +277,7 @@ pub async fn delete_sample_data( | |||||||
|         &http_req, |         &http_req, | ||||||
|         payload.into_inner(), |         payload.into_inner(), | ||||||
|         sample_data::delete_sample_data_for_user, |         sample_data::delete_sample_data_for_user, | ||||||
|         &auth::JWTAuth(Permission::MerchantAccountWrite), |         &auth::JWTAuth(Permission::PaymentWrite), | ||||||
|         api_locking::LockAction::NotApplicable, |         api_locking::LockAction::NotApplicable, | ||||||
|     )) |     )) | ||||||
|     .await |     .await | ||||||
|  | |||||||
| @ -121,7 +121,7 @@ pub async fn delete_user_role( | |||||||
|     req: HttpRequest, |     req: HttpRequest, | ||||||
|     payload: web::Json<user_role_api::DeleteUserRoleRequest>, |     payload: web::Json<user_role_api::DeleteUserRoleRequest>, | ||||||
| ) -> HttpResponse { | ) -> HttpResponse { | ||||||
|     let flow = Flow::DeleteUser; |     let flow = Flow::DeleteUserRole; | ||||||
|     Box::pin(api::server_wrap( |     Box::pin(api::server_wrap( | ||||||
|         flow, |         flow, | ||||||
|         state.clone(), |         state.clone(), | ||||||
|  | |||||||
| @ -327,8 +327,8 @@ pub enum Flow { | |||||||
|     InviteUser, |     InviteUser, | ||||||
|     /// Invite multiple users |     /// Invite multiple users | ||||||
|     InviteMultipleUser, |     InviteMultipleUser, | ||||||
|     /// Delete user |     /// Delete user role | ||||||
|     DeleteUser, |     DeleteUserRole, | ||||||
|     /// Incremental Authorization flow |     /// Incremental Authorization flow | ||||||
|     PaymentsIncrementalAuthorization, |     PaymentsIncrementalAuthorization, | ||||||
|     /// Get action URL for connector onboarding |     /// Get action URL for connector onboarding | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 Apoorv Dixit
					Apoorv Dixit