Repository navigation
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Here's my review of this diff:
Summary of the change:
A permission check
v-if="perm.system.user.edit()"was added toButtonChangeUserPassword, aligning it with the adjacent delete button which already has a permission guard.Assessment:
Good — Consistency improved: The delete button already had
v-if="perm.system.user.delete()", but the "change password" button had none. Adding a permission gate is the correct fix.Questionable — Correct permission used? Changing a user's password may not logically map to the
editpermission. Verify whether:perm.system.user.changePassword()/resetPassword().edit()is the right gate or if it silently grants too much.Potential issue — Backend enforcement: A front-end
v-ifonly hides the UI. Ensure the backend API endpoint that changes/resets a user's password also enforces the same permission (never rely on the client). Confirm this exists.Consistency nit: The other buttons (
MkTooltip, delete) use different wrapper patterns. Herev-ifis placed directly onButtonChangeUserPassword, whereas delete wrapsel-buttonin anMkTooltip. That's fine, but confirmButtonChangeUserPasswordrenders nothing undesirable when hidden (e.g., no stray tooltip/wrapper). Sincev-ifremoves the whole component, this is OK.No hook/binding concern visible: Nothing in this hunk suggests reactivity problems;
permappears to be a reactive object used elsewhere in the template.Style: Inline
v-ifis consistent with the surrounding code — acceptable here.Recommendation: Keep the change (it fixes a real UI-permission gap), but (a) confirm
perm.system.user.edit()is the semantically correct and sufficiently privileged check for password changes, and (b) verify the backend enforces the same check. If password reset warrants its own permission, use that instead.