-
-
Notifications
You must be signed in to change notification settings - Fork 256
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
feature(locksmith): Update access control for checkoutConfigs
#14833
feature(locksmith): Update access control for checkoutConfigs
#14833
Conversation
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.
Let's talk about the way to list... because I don't think we can do that.
sure thing! |
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.
More cleanup and changes...
if (existingConfig) { | ||
const authorized = await isUserAuthorized(user, existingConfig) | ||
if (!authorized) { | ||
throw new Error('User not authorized to update this configuration') |
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.
If this throws then we need to handle it specifically at the controller level to return a 403
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.
I think it would be nice to add tests here please
Description
This PR introduces changes to transition the access control mechanism for checkout configurations from relying on the
createdBy
field to using lock managers.Previously, a user could only list, or edit a checkout config if they were its creator. With this update, lock managers are now granted the ability to manage configurations for locks they control, even if they are not the original creators.
Key changes include:
Issues
Fixes #14248
Refs #14248
Checklist: