mirror of
https://github.com/wekan/wekan.git
synced 2026-03-12 08:32:33 +01:00
debug isBoardAdmin on main page
This commit is contained in:
parent
a68ecc079d
commit
35ae07e2a6
3 changed files with 7 additions and 3 deletions
|
|
@ -39,7 +39,7 @@ template(name="boardList")
|
||||||
i.fa.js-archive-board(
|
i.fa.js-archive-board(
|
||||||
class="fa-archive"
|
class="fa-archive"
|
||||||
title="{{_ 'archive-board'}}")
|
title="{{_ 'archive-board'}}")
|
||||||
else if currentUser.isBoardAdmin
|
else if isAdministrable
|
||||||
i.fa.js-clone-board(
|
i.fa.js-clone-board(
|
||||||
class="fa-clone"
|
class="fa-clone"
|
||||||
title="{{_ 'duplicate-board'}}")
|
title="{{_ 'duplicate-board'}}")
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,10 @@ BlazeComponent.extendComponent({
|
||||||
const user = Meteor.user();
|
const user = Meteor.user();
|
||||||
return user && user.hasStarred(this.currentData()._id);
|
return user && user.hasStarred(this.currentData()._id);
|
||||||
},
|
},
|
||||||
|
isAdministrable() {
|
||||||
|
const user = Meteor.user();
|
||||||
|
return user && user.isBoardAdmin(this.currentData()._id);
|
||||||
|
},
|
||||||
|
|
||||||
hasOvertimeCards() {
|
hasOvertimeCards() {
|
||||||
subManager.subscribe('board', this.currentData()._id, false);
|
subManager.subscribe('board', this.currentData()._id, false);
|
||||||
|
|
|
||||||
|
|
@ -377,8 +377,8 @@ if (Meteor.isClient) {
|
||||||
return board && board.hasWorker(this._id);
|
return board && board.hasWorker(this._id);
|
||||||
},
|
},
|
||||||
|
|
||||||
isBoardAdmin() {
|
isBoardAdmin(boardId = Session.get('currentBoard')) {
|
||||||
const board = Boards.findOne(Session.get('currentBoard'));
|
const board = Boards.findOne(boardId);
|
||||||
return board && board.hasAdmin(this._id);
|
return board && board.hasAdmin(this._id);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue