mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 04:57:07 -04:00
Merge pull request #3013 from salleman33/master
debug isBoardAdmin on main page
This commit is contained in:
commit
b841f798f8
3 changed files with 7 additions and 3 deletions
|
@ -39,7 +39,7 @@ template(name="boardList")
|
|||
i.fa.js-archive-board(
|
||||
class="fa-archive"
|
||||
title="{{_ 'archive-board'}}")
|
||||
else if currentUser.isBoardAdmin
|
||||
else if isAdministrable
|
||||
i.fa.js-clone-board(
|
||||
class="fa-clone"
|
||||
title="{{_ 'duplicate-board'}}")
|
||||
|
|
|
@ -42,6 +42,10 @@ BlazeComponent.extendComponent({
|
|||
const user = Meteor.user();
|
||||
return user && user.hasStarred(this.currentData()._id);
|
||||
},
|
||||
isAdministrable() {
|
||||
const user = Meteor.user();
|
||||
return user && user.isBoardAdmin(this.currentData()._id);
|
||||
},
|
||||
|
||||
hasOvertimeCards() {
|
||||
subManager.subscribe('board', this.currentData()._id, false);
|
||||
|
|
|
@ -377,8 +377,8 @@ if (Meteor.isClient) {
|
|||
return board && board.hasWorker(this._id);
|
||||
},
|
||||
|
||||
isBoardAdmin() {
|
||||
const board = Boards.findOne(Session.get('currentBoard'));
|
||||
isBoardAdmin(boardId = Session.get('currentBoard')) {
|
||||
const board = Boards.findOne(boardId);
|
||||
return board && board.hasAdmin(this._id);
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue