utils.js 454 B

12345678910111213141516171819
  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. allowIsBoardMemberNonComment = function(userId, board) {
  8. return board && board.hasMember(userId) && !board.hasCommentOnly(userId);
  9. };
  10. allowIsBoardMemberByCard = function(userId, card) {
  11. const board = card.board();
  12. return board && board.hasMember(userId);
  13. };