diff --git a/framework/core/js/src/admin/components/PermissionGrid.tsx b/framework/core/js/src/admin/components/PermissionGrid.tsx index 6044576b0..ef2a71c0c 100644 --- a/framework/core/js/src/admin/components/PermissionGrid.tsx +++ b/framework/core/js/src/admin/components/PermissionGrid.tsx @@ -38,11 +38,13 @@ export default class PermissionGrid { return scopes.map((scope) => { + // This indicates the "permission" is a permission category, + // in which case we return an empty table cell. if ('children' in permission) { return ; } - return scope.render(permission); + return {scope.render(permission)}; }); }; @@ -416,7 +418,7 @@ export default class PermissionGrid { - const active = app.data.settings[this.attrs.key] === value; + const active = app.data.settings[this.attrs.setting] === value; return Button.component( { icon: active ? 'fas fa-check' : true, - onclick: saveSettings.bind(this, { [this.attrs.key]: value }), + onclick: saveSettings.bind(this, { [this.attrs.setting]: value }), active, }, label