mirror of
https://github.com/wekan/wekan.git
synced 2025-12-18 00:10:13 +01:00
Card Details Popup is now modifiable if the user has the permissions
This commit is contained in:
parent
f4a3363f6f
commit
8ec4e1a7d0
1 changed files with 14 additions and 9 deletions
|
|
@ -458,46 +458,51 @@ Users.safeFields = {
|
||||||
if (Meteor.isClient) {
|
if (Meteor.isClient) {
|
||||||
Users.helpers({
|
Users.helpers({
|
||||||
isBoardMember() {
|
isBoardMember() {
|
||||||
const board = Boards.findOne(Session.get('currentBoard'));
|
const board = Utils.getCurrentBoard();
|
||||||
return board && board.hasMember(this._id);
|
return board && board.hasMember(this._id);
|
||||||
},
|
},
|
||||||
|
|
||||||
isNotNoComments() {
|
isNotNoComments() {
|
||||||
const board = Boards.findOne(Session.get('currentBoard'));
|
const board = Utils.getCurrentBoard();
|
||||||
return (
|
return (
|
||||||
board && board.hasMember(this._id) && !board.hasNoComments(this._id)
|
board && board.hasMember(this._id) && !board.hasNoComments(this._id)
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
isNoComments() {
|
isNoComments() {
|
||||||
const board = Boards.findOne(Session.get('currentBoard'));
|
const board = Utils.getCurrentBoard();
|
||||||
return board && board.hasNoComments(this._id);
|
return board && board.hasNoComments(this._id);
|
||||||
},
|
},
|
||||||
|
|
||||||
isNotCommentOnly() {
|
isNotCommentOnly() {
|
||||||
const board = Boards.findOne(Session.get('currentBoard'));
|
const board = Utils.getCurrentBoard();
|
||||||
return (
|
return (
|
||||||
board && board.hasMember(this._id) && !board.hasCommentOnly(this._id)
|
board && board.hasMember(this._id) && !board.hasCommentOnly(this._id)
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
isCommentOnly() {
|
isCommentOnly() {
|
||||||
const board = Boards.findOne(Session.get('currentBoard'));
|
const board = Utils.getCurrentBoard();
|
||||||
return board && board.hasCommentOnly(this._id);
|
return board && board.hasCommentOnly(this._id);
|
||||||
},
|
},
|
||||||
|
|
||||||
isNotWorker() {
|
isNotWorker() {
|
||||||
const board = Boards.findOne(Session.get('currentBoard'));
|
const board = Utils.getCurrentBoard();
|
||||||
return board && board.hasMember(this._id) && !board.hasWorker(this._id);
|
return board && board.hasMember(this._id) && !board.hasWorker(this._id);
|
||||||
},
|
},
|
||||||
|
|
||||||
isWorker() {
|
isWorker() {
|
||||||
const board = Boards.findOne(Session.get('currentBoard'));
|
const board = Utils.getCurrentBoard();
|
||||||
return board && board.hasWorker(this._id);
|
return board && board.hasWorker(this._id);
|
||||||
},
|
},
|
||||||
|
|
||||||
isBoardAdmin(boardId = Session.get('currentBoard')) {
|
isBoardAdmin(boardId) {
|
||||||
const board = Boards.findOne(boardId);
|
let board;
|
||||||
|
if (boardId) {
|
||||||
|
board = Boards.findOne(boardId);
|
||||||
|
} else {
|
||||||
|
board = Utils.getCurrentBoard();
|
||||||
|
}
|
||||||
return board && board.hasAdmin(this._id);
|
return board && board.hasAdmin(this._id);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue