From a7ff92cbff0bfb948b4537b743dc2c42b0ec72d9 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Mon, 18 May 2015 14:58:59 +0930 Subject: [PATCH] Only allow user profile to be edited if user has permission. Fixes #72 --- framework/core/js/forum/src/components/user-page.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/core/js/forum/src/components/user-page.js b/framework/core/js/forum/src/components/user-page.js index bc4ba6c8f..47ccbb2be 100644 --- a/framework/core/js/forum/src/components/user-page.js +++ b/framework/core/js/forum/src/components/user-page.js @@ -52,7 +52,7 @@ export default class UserPage extends Component { var user = this.user(); return m('div', {config: this.onload.bind(this)}, user ? [ - UserCard.component({user, className: 'hero user-hero', editable: true, controlsButtonClass: 'btn btn-default'}), + UserCard.component({user, className: 'hero user-hero', editable: user.canEdit(), controlsButtonClass: 'btn btn-default'}), m('div.container', [ m('nav.side-nav.user-nav', {config: this.affixSidebar}, [ m('ul', listItems(this.sidebarItems().toArray()))