mirror of
https://github.com/flarum/framework.git
synced 2024-12-02 23:23:52 +08:00
Only allow user profile to be edited if user has permission. Fixes #72
This commit is contained in:
parent
3fcf8f3da5
commit
a7ff92cbff
|
@ -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()))
|
||||
|
|
Loading…
Reference in New Issue
Block a user