-
Notifications
You must be signed in to change notification settings - Fork 524
Approval bypass v2 oss #6510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Approval bypass v2 oss #6510
Conversation
IsUserSuperAdmin: isSuperAdmin, | ||
UserId: userId, | ||
} | ||
response := handler.bulkUpdateService.BulkUpdate(script.Spec, userMetadata) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can set userMetaData in spec?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we do that? , since userMetadata is not related to bulkUpdatePayload and for checking if a user is exception or not (i.e is allowed to perform action bulk) this userMetadata is a must, and in this way a function expectations will be set that userMetadata is required , so that in future if someone uses this they will pass userMetadata (if that is set in bulk payload then that can be missed )
UserId: request.UserId, | ||
} | ||
|
||
response, err := handler.bulkUpdateService.BulkHibernate(r.Context(), request, token, handler.checkAuthForBulkHibernateAndUnhibernate, userMetadata) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets not pass token here, and get token inside through context
IsUserSuperAdmin: isSuperAdmin, | ||
UserId: request.UserId, | ||
} | ||
response, err := handler.bulkUpdateService.BulkUnHibernate(r.Context(), request, token, handler.checkAuthForBulkHibernateAndUnhibernate, userMetadata) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as before
|
Description
Fixes #
Checklist:
Does this PR introduce a user-facing change?