mirror of
https://github.com/flarum/framework.git
synced 2025-02-26 17:45:25 +08:00
Fix permission check in edit modal
Previously was checking ability to edit own user instead of user selected in modal
This commit is contained in:
parent
6a940cd34f
commit
97dfb50f17
@ -61,7 +61,7 @@ export default class EditUserModal<CustomAttrs extends IEditUserModalAttrs = IEd
|
||||
fields() {
|
||||
const items = new ItemList();
|
||||
|
||||
if (app.session.user?.canEditCredentials()) {
|
||||
if (this.attrs.user.canEditCredentials()) {
|
||||
items.add(
|
||||
'username',
|
||||
<div className="Form-group">
|
||||
@ -145,7 +145,7 @@ export default class EditUserModal<CustomAttrs extends IEditUserModalAttrs = IEd
|
||||
}
|
||||
}
|
||||
|
||||
if (app.session.user?.canEditGroups()) {
|
||||
if (this.attrs.user.canEditGroups()) {
|
||||
items.add(
|
||||
'groups',
|
||||
<div className="Form-group EditUserModal-groups">
|
||||
|
Loading…
x
Reference in New Issue
Block a user