-
Notifications
You must be signed in to change notification settings - Fork 159
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
Allow to delete passwords on public links when password is enforced but permission is set #9857
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
issues:
|
const passwordEnforced = | ||
store.getters.capabilities?.files_sharing?.public?.password?.enforced_for?.read_only === | ||
true | ||
|
||
if (passwordEnforced) { | ||
return showQuickLinkPasswordModal( | ||
{ store, $gettext: language.$gettext, passwordPolicyService }, | ||
async (password) => { | ||
await copyQuicklink({ | ||
ability, | ||
clientService, | ||
language, | ||
password, | ||
resource: item, | ||
store | ||
}) | ||
} | ||
) | ||
} | ||
|
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.
centralized
587759b
to
12abdb3
Compare
SonarCloud Quality Gate failed. 0 Bugs 55.8% Coverage Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
@@ -338,7 +342,7 @@ export default defineComponent({ | |||
}) | |||
} | |||
} | |||
if (!this.isPasswordEnforced && !this.link.password && !this.isAliasLink) { |
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.
Huh I don't get this check in the first place? If password is not enforced we don't allow the user to add a password ?
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.
👍
…ut permission is set (#9857) * Allow to remove password on public link if permission allows * Fix bug where password prompt did instant pop up * Refactor * Remove unused capability * Fix unit tests
Description
We've enabled to ability to allow delete passwords on public links, even if the password is enforced.
Therefore, the user needs respective permission, granted by the server.
This feature is only possible on public links that have the viewer role.
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist:
Open tasks: