Skip to content

Commit

Permalink
fix(user): change permission for sample data (#3462)
Browse files Browse the repository at this point in the history
  • Loading branch information
apoorvdixit88 authored Jan 30, 2024
1 parent 224c1cf commit 610c1c5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions crates/router/src/routes/lock_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ impl From<Flow> for ApiIdentifier {
| Flow::ResetPassword
| Flow::InviteUser
| Flow::InviteMultipleUser
| Flow::DeleteUser
| Flow::UserSignUpWithMerchantId
| Flow::VerifyEmailWithoutInviteChecks
| Flow::VerifyEmail
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions crates/router/src/routes/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/routes/user_role.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
4 changes: 2 additions & 2 deletions crates/router_env/src/logger/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 610c1c5

Please sign in to comment.