mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 17:47:54 +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::InviteUser
|
||||
| Flow::InviteMultipleUser
|
||||
| Flow::DeleteUser
|
||||
| Flow::UserSignUpWithMerchantId
|
||||
| Flow::VerifyEmailWithoutInviteChecks
|
||||
| Flow::VerifyEmail
|
||||
@ -191,7 +190,8 @@ impl From<Flow> for ApiIdentifier {
|
||||
| Flow::GetRoleFromToken
|
||||
| Flow::UpdateUserRole
|
||||
| Flow::GetAuthorizationInfo
|
||||
| Flow::AcceptInvitation => Self::UserRole,
|
||||
| Flow::AcceptInvitation
|
||||
| Flow::DeleteUserRole => Self::UserRole,
|
||||
|
||||
Flow::GetActionUrl | Flow::SyncOnboardingStatus | Flow::ResetTrackingId => {
|
||||
Self::ConnectorOnboarding
|
||||
|
||||
@ -257,7 +257,7 @@ pub async fn generate_sample_data(
|
||||
&http_req,
|
||||
payload.into_inner(),
|
||||
sample_data::generate_sample_data_for_user,
|
||||
&auth::JWTAuth(Permission::MerchantAccountWrite),
|
||||
&auth::JWTAuth(Permission::PaymentWrite),
|
||||
api_locking::LockAction::NotApplicable,
|
||||
))
|
||||
.await
|
||||
@ -277,7 +277,7 @@ pub async fn delete_sample_data(
|
||||
&http_req,
|
||||
payload.into_inner(),
|
||||
sample_data::delete_sample_data_for_user,
|
||||
&auth::JWTAuth(Permission::MerchantAccountWrite),
|
||||
&auth::JWTAuth(Permission::PaymentWrite),
|
||||
api_locking::LockAction::NotApplicable,
|
||||
))
|
||||
.await
|
||||
|
||||
@ -121,7 +121,7 @@ pub async fn delete_user_role(
|
||||
req: HttpRequest,
|
||||
payload: web::Json<user_role_api::DeleteUserRoleRequest>,
|
||||
) -> HttpResponse {
|
||||
let flow = Flow::DeleteUser;
|
||||
let flow = Flow::DeleteUserRole;
|
||||
Box::pin(api::server_wrap(
|
||||
flow,
|
||||
state.clone(),
|
||||
|
||||
@ -327,8 +327,8 @@ pub enum Flow {
|
||||
InviteUser,
|
||||
/// Invite multiple users
|
||||
InviteMultipleUser,
|
||||
/// Delete user
|
||||
DeleteUser,
|
||||
/// Delete user role
|
||||
DeleteUserRole,
|
||||
/// Incremental Authorization flow
|
||||
PaymentsIncrementalAuthorization,
|
||||
/// Get action URL for connector onboarding
|
||||
|
||||
Reference in New Issue
Block a user