mirror of
https://github.com/flarum/framework.git
synced 2025-06-04 06:44:33 +08:00
Make discussion edit permission specific to renaming
This commit is contained in:
@ -67,7 +67,7 @@ export default function(app) {
|
||||
items.add('separator', Separator.component());
|
||||
}
|
||||
|
||||
if (this.canEdit()) {
|
||||
if (this.canRename()) {
|
||||
items.add('rename', ActionButton.component({ icon: 'pencil', label: 'Rename', onclick: this.renameAction.bind(this) }));
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ Discussion.prototype.lastPost = Model.one('lastPost');
|
||||
Discussion.prototype.lastPostNumber = Model.prop('lastPostNumber');
|
||||
|
||||
Discussion.prototype.canReply = Model.prop('canReply');
|
||||
Discussion.prototype.canEdit = Model.prop('canEdit');
|
||||
Discussion.prototype.canRename = Model.prop('canRename');
|
||||
Discussion.prototype.canDelete = Model.prop('canDelete');
|
||||
|
||||
Discussion.prototype.commentsCount = Model.prop('commentsCount');
|
||||
|
Reference in New Issue
Block a user