utils.js 588 B

1234567891011121314151617181920
  1. allowIsBoardAdmin = function(userId, board) {
  2. return board && board.hasAdmin(userId);
  3. };
  4. allowIsBoardMember = function(userId, board) {
  5. return board && board.hasMember(userId);
  6. };
  7. allowIsBoardMemberCommentOnly = function(userId, board) {
  8. return board && board.hasMember(userId) && !board.hasCommentOnly(userId);
  9. };
  10. allowIsBoardMemberNoComments = function(userId, board) {
  11. return board && board.hasMember(userId) && !board.hasNoComments(userId);
  12. };
  13. allowIsBoardMemberByCard = function(userId, card) {
  14. const board = card.board();
  15. return board && board.hasMember(userId);
  16. };