-
Notifications
You must be signed in to change notification settings - Fork 168
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
Fix password enforcement #8745
Fix password enforcement #8745
Conversation
Hard realization: the passwordEnforced capability member names are misleading. They don't map to permissions, but to the existing roles. That is most obvious with the "read_write" password enforcement, which needs "read" and "create", but doesn't accept "update" and "delete". Not accepting "update" is not reasonable on a "read_write".
onError(e) | ||
console.error(e) | ||
this.showMessage({ | ||
title: this.$gettext('Failed to create link'), | ||
status: 'danger' | ||
}) | ||
}) | ||
return |
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.
prevents a fall through to the success message when the request resulted in an error status code. previously an error would cause both the error and the success message.
}) | ||
return |
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.
prevents a fall through to the success message when the request resulted in an error status code. previously an error would cause both the error and the success message.
|
||
/** | ||
* `passwordEnforced` members are oddly designed. they look like they map to permissions, | ||
* but in reality they map to role names. hence the comparison with specific link roles. |
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.
wanted to add that I feel betrayed by the capability. It looks so promising regarding permissions... but it's a big nope in reality.
SonarCloud Quality Gate failed. |
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.
Don't know much about any of this, but looks good code wise
Description
Fix some quirks of the public link password enforcement.
Types of changes
Checklist: