Browse Source

Merge branch 'devel'

Lauri Ojansivu 6 years ago
parent
commit
3721742327
59 changed files with 196 additions and 50 deletions
  1. 2 1
      .eslintrc.json
  2. 9 0
      CHANGELOG.md
  3. 21 18
      client/components/cards/cardDetails.jade
  4. 5 4
      client/components/cards/minicard.jade
  5. 11 4
      client/components/sidebar/sidebar.jade
  6. 12 3
      client/components/sidebar/sidebar.js
  7. 2 0
      i18n/ar.i18n.json
  8. 2 0
      i18n/bg.i18n.json
  9. 2 0
      i18n/br.i18n.json
  10. 2 0
      i18n/ca.i18n.json
  11. 2 0
      i18n/cs.i18n.json
  12. 2 0
      i18n/de.i18n.json
  13. 2 0
      i18n/el.i18n.json
  14. 2 0
      i18n/en-GB.i18n.json
  15. 2 0
      i18n/en.i18n.json
  16. 2 0
      i18n/eo.i18n.json
  17. 2 0
      i18n/es-AR.i18n.json
  18. 2 0
      i18n/es.i18n.json
  19. 2 0
      i18n/eu.i18n.json
  20. 2 0
      i18n/fa.i18n.json
  21. 2 0
      i18n/fi.i18n.json
  22. 2 0
      i18n/fr.i18n.json
  23. 2 0
      i18n/gl.i18n.json
  24. 2 0
      i18n/he.i18n.json
  25. 2 0
      i18n/hu.i18n.json
  26. 2 0
      i18n/hy.i18n.json
  27. 2 0
      i18n/id.i18n.json
  28. 2 0
      i18n/ig.i18n.json
  29. 2 0
      i18n/it.i18n.json
  30. 2 0
      i18n/ja.i18n.json
  31. 2 0
      i18n/ka.i18n.json
  32. 2 0
      i18n/km.i18n.json
  33. 2 0
      i18n/ko.i18n.json
  34. 2 0
      i18n/lv.i18n.json
  35. 2 0
      i18n/mn.i18n.json
  36. 2 0
      i18n/nb.i18n.json
  37. 2 0
      i18n/nl.i18n.json
  38. 2 0
      i18n/pl.i18n.json
  39. 2 0
      i18n/pt-BR.i18n.json
  40. 2 0
      i18n/pt.i18n.json
  41. 2 0
      i18n/ro.i18n.json
  42. 2 0
      i18n/ru.i18n.json
  43. 2 0
      i18n/sr.i18n.json
  44. 2 0
      i18n/sv.i18n.json
  45. 2 0
      i18n/ta.i18n.json
  46. 2 0
      i18n/th.i18n.json
  47. 10 8
      i18n/tr.i18n.json
  48. 2 0
      i18n/uk.i18n.json
  49. 2 0
      i18n/vi.i18n.json
  50. 2 0
      i18n/zh-CN.i18n.json
  51. 2 0
      i18n/zh-TW.i18n.json
  52. 12 1
      models/boards.js
  53. 3 3
      models/lists.js
  54. 3 3
      models/swimlanes.js
  55. 10 0
      models/users.js
  56. 1 1
      package.json
  57. 2 2
      sandstorm-pkgdef.capnp
  58. 2 1
      sandstorm.js
  59. 5 1
      server/lib/utils.js

+ 2 - 1
.eslintrc.json

@@ -121,7 +121,8 @@
     "allowIsBoardAdmin": true,
     "allowIsBoardMember": true,
     "allowIsBoardMemberByCard": true,
-    "allowIsBoardMemberNonComment": true,
+    "allowIsBoardMemberCommentOnly": true,
+    "allowIsBoardMemberNoComments": true,
     "Emoji": true,
     "Checklists": true,
     "Settings": true,

+ 9 - 0
CHANGELOG.md

@@ -1,3 +1,12 @@
+# v1.40 2018-09-04 Wekan release
+
+This release adds the following new features:
+
+- [Add permission "No comments"](https://github.com/wekan/wekan/commit/77efcf71376d3da6c19ad1a4910567263e83c0ca).
+  It is like normal user, but [does not show comments and activities](https://github.com/wekan/wekan/issues/1861).
+
+Thanks to GitHub user xet7 for contributions.
+
 # v1.39 2018-08-29 Wekan release
 
 This release fixes the following bugs:

+ 21 - 18
client/components/cards/cardDetails.jade

@@ -173,25 +173,28 @@ template(name="cardDetails")
     +attachmentsGalery
 
     hr
-    .activity-title
-      h3 {{ _ 'activity'}}
-      if currentUser.isBoardMember
-        .material-toggle-switch
-          span.toggle-switch-title {{_ 'hide-system-messages'}}
-          if hiddenSystemMessages
-            input.toggle-switch(type="checkbox" id="toggleButton" checked="checked")
-          else
-            input.toggle-switch(type="checkbox" id="toggleButton")
-          label.toggle-label(for="toggleButton")
+    unless currentUser.isNoComments
+      .activity-title
+        h3 {{ _ 'activity'}}
+        if currentUser.isBoardMember
+          .material-toggle-switch
+            span.toggle-switch-title {{_ 'hide-system-messages'}}
+            if hiddenSystemMessages
+              input.toggle-switch(type="checkbox" id="toggleButton" checked="checked")
+            else
+              input.toggle-switch(type="checkbox" id="toggleButton")
+            label.toggle-label(for="toggleButton")
     if currentUser.isBoardMember
-      +commentForm
-    if isLoaded.get
-      if isLinkedCard
-        +activities(card=this mode="linkedcard")
-      else if isLinkedBoard
-        +activities(card=this mode="linkedboard")
-      else
-        +activities(card=this mode="card")
+      unless currentUser.isNoComments
+        +commentForm
+    unless currentUser.isNoComments
+      if isLoaded.get
+        if isLinkedCard
+          +activities(card=this mode="linkedcard")
+        else if isLinkedBoard
+          +activities(card=this mode="linkedboard")
+        else
+          +activities(card=this mode="card")
 
 template(name="editCardTitleForm")
   textarea.js-edit-card-title(rows='1' autofocus)

+ 5 - 4
client/components/cards/minicard.jade

@@ -65,10 +65,11 @@ template(name="minicard")
           +userAvatar(userId=this)
 
     .badges
-      if comments.count
-        .badge(title="{{_ 'card-comments-title' comments.count }}")
-          span.badge-icon.fa.fa-comment-o.badge-comment
-          span.badge-text= comments.count
+      unless currentUser.isNoComments
+        if comments.count
+          .badge(title="{{_ 'card-comments-title' comments.count }}")
+            span.badge-icon.fa.fa-comment-o.badge-comment
+            span.badge-text= comments.count
       if getDescription
         .badge.badge-state-image-only(title=getDescription)
           span.badge-icon.fa.fa-align-left

+ 11 - 4
client/components/sidebar/sidebar.jade

@@ -23,10 +23,11 @@ template(name='homeSidebar')
   hr
   +labelsWidget
   hr
-  h3
-    i.fa.fa-comments-o
-    | {{_ 'activities'}}
-  +activities(mode="board")
+  unless currentUser.isNoComments
+    h3
+      i.fa.fa-comments-o
+      | {{_ 'activities'}}
+    +activities(mode="board")
 
 template(name="membersWidget")
   .board-widget.board-widget-members
@@ -145,6 +146,12 @@ template(name="changePermissionsPopup")
         if isNormal
           i.fa.fa-check
         span.sub-name {{_ 'normal-desc'}}
+    li
+      a(class="{{#if isLastAdmin}}disabled{{else}}js-set-no-comments{{/if}}")
+        | {{_ 'no-comments'}}
+        if isNoComments
+          i.fa.fa-check
+        span.sub-name {{_ 'no-comments-desc'}}
     li
       a(class="{{#if isLastAdmin}}disabled{{else}}js-set-comment-only{{/if}}")
         | {{_ 'comment-only'}}

+ 12 - 3
client/components/sidebar/sidebar.js

@@ -126,8 +126,11 @@ Template.memberPopup.helpers({
     if(type === 'normal'){
       const currentBoard = Boards.findOne(Session.get('currentBoard'));
       const commentOnly = currentBoard.hasCommentOnly(this.userId);
+      const noComments = currentBoard.hasNoComments(this.userId);
       if(commentOnly){
         return TAPi18n.__('comment-only').toLowerCase();
+      } else if(noComments) {
+        return TAPi18n.__('no-comments').toLowerCase();
       } else {
         return TAPi18n.__(type).toLowerCase();
       }
@@ -324,12 +327,13 @@ BlazeComponent.extendComponent({
 }).register('addMemberPopup');
 
 Template.changePermissionsPopup.events({
-  'click .js-set-admin, click .js-set-normal, click .js-set-comment-only'(event) {
+  'click .js-set-admin, click .js-set-normal, click .js-set-no-comments, click .js-set-comment-only'(event) {
     const currentBoard = Boards.findOne(Session.get('currentBoard'));
     const memberId = this.userId;
     const isAdmin = $(event.currentTarget).hasClass('js-set-admin');
     const isCommentOnly = $(event.currentTarget).hasClass('js-set-comment-only');
-    currentBoard.setMemberPermission(memberId, isAdmin, isCommentOnly);
+    const isNoComments = $(event.currentTarget).hasClass('js-set-no-comments');
+    currentBoard.setMemberPermission(memberId, isAdmin, isNoComments, isCommentOnly);
     Popup.back(1);
   },
 });
@@ -342,7 +346,12 @@ Template.changePermissionsPopup.helpers({
 
   isNormal() {
     const currentBoard = Boards.findOne(Session.get('currentBoard'));
-    return !currentBoard.hasAdmin(this.userId) && !currentBoard.hasCommentOnly(this.userId);
+    return !currentBoard.hasAdmin(this.userId) && !currentBoard.hasNoComments(this.userId) && !currentBoard.hasCommentOnly(this.userId);
+  },
+
+  isNoComments() {
+    const currentBoard = Boards.findOne(Session.get('currentBoard'));
+    return !currentBoard.hasAdmin(this.userId) && currentBoard.hasNoComments(this.userId);
   },
 
   isCommentOnly() {

+ 2 - 0
i18n/ar.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "أكتب تعليق",
     "comment-only": "التعليق فقط",
     "comment-only-desc": "يمكن التعليق على بطاقات فقط.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "حاسوب",
     "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?",
     "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",

+ 2 - 0
i18n/bg.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Напиши коментар",
     "comment-only": "Само коментар",
     "comment-only-desc": "Може да коментира само в карти.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Компютър",
     "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?",
     "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",

+ 2 - 0
i18n/br.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Write Comment",
     "comment-only": "Comment only",
     "comment-only-desc": "Can comment on cards only.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Computer",
     "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?",
     "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",

+ 2 - 0
i18n/ca.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Escriu un comentari",
     "comment-only": "Només comentaris",
     "comment-only-desc": "Només pots fer comentaris a les fitxes",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Ordinador",
     "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?",
     "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",

+ 2 - 0
i18n/cs.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Text komentáře",
     "comment-only": "Pouze komentáře",
     "comment-only-desc": "Může přidávat komentáře pouze do karet.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Počítač",
     "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?",
     "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",

+ 2 - 0
i18n/de.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Kommentar schreiben",
     "comment-only": "Nur kommentierbar",
     "comment-only-desc": "Kann Karten nur Kommentieren",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Computer",
     "confirm-subtask-delete-dialog": "Wollen Sie die Teilaufgabe wirklich löschen?",
     "confirm-checklist-delete-dialog": "Wollen Sie die Checkliste wirklich löschen?",

+ 2 - 0
i18n/el.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Write Comment",
     "comment-only": "Comment only",
     "comment-only-desc": "Can comment on cards only.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Υπολογιστής",
     "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?",
     "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",

+ 2 - 0
i18n/en-GB.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Write Comment",
     "comment-only": "Comment only",
     "comment-only-desc": "Can comment on cards only.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Computer",
     "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?",
     "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",

+ 2 - 0
i18n/en.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Write Comment",
     "comment-only": "Comment only",
     "comment-only-desc": "Can comment on cards only.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Computer",
     "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?",
     "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",

+ 2 - 0
i18n/eo.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Write Comment",
     "comment-only": "Comment only",
     "comment-only-desc": "Can comment on cards only.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Komputilo",
     "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?",
     "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",

+ 2 - 0
i18n/es-AR.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Comentar",
     "comment-only": "Comentar solamente",
     "comment-only-desc": "Puede comentar en tarjetas solamente.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Computadora",
     "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?",
     "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",

+ 2 - 0
i18n/es.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Escribir comentario",
     "comment-only": "Sólo comentarios",
     "comment-only-desc": "Solo puedes comentar en las tarjetas.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "el ordenador",
     "confirm-subtask-delete-dialog": "¿Seguro que quieres eliminar la subtarea?",
     "confirm-checklist-delete-dialog": "¿Seguro que quieres eliminar la lista de verificación?",

+ 2 - 0
i18n/eu.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Idatzi iruzkin bat",
     "comment-only": "Iruzkinak besterik ez",
     "comment-only-desc": "Iruzkinak txarteletan soilik egin ditzake",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Ordenagailua",
     "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?",
     "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",

+ 2 - 0
i18n/fa.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "درج نظر",
     "comment-only": "فقط نظر",
     "comment-only-desc": "فقط می‌تواند روی کارت‌ها نظر دهد.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "رایانه",
     "confirm-subtask-delete-dialog": "از حذف این زیر وظیفه اطمینان دارید؟",
     "confirm-checklist-delete-dialog": "مطمئنا چک لیست پاک شود؟",

+ 2 - 0
i18n/fi.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Kirjoita kommentti",
     "comment-only": "Vain kommentointi",
     "comment-only-desc": "Voi vain kommentoida kortteja",
+    "no-comments": "Ei kommentteja",
+    "no-comments-desc": "Ei voi nähdä kommentteja ja toimintaa.",
     "computer": "Tietokone",
     "confirm-subtask-delete-dialog": "Oletko varma että haluat poistaa alitehtävän?",
     "confirm-checklist-delete-dialog": "Oletko varma että haluat poistaa tarkistuslistan?",

+ 2 - 0
i18n/fr.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Écrire un commentaire",
     "comment-only": "Commentaire uniquement",
     "comment-only-desc": "Ne peut que commenter des cartes.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Ordinateur",
     "confirm-subtask-delete-dialog": "Êtes-vous sûr de vouloir supprimer la sous-tâche ?",
     "confirm-checklist-delete-dialog": "Êtes-vous sûr de vouloir supprimer la checklist ?",

+ 2 - 0
i18n/gl.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Escribir un comentario",
     "comment-only": "Comment only",
     "comment-only-desc": "Can comment on cards only.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Computador",
     "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?",
     "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",

+ 2 - 0
i18n/he.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "כתיבת הערה",
     "comment-only": "הערה בלבד",
     "comment-only-desc": "ניתן להעיר על כרטיסים בלבד.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "מחשב",
     "confirm-subtask-delete-dialog": "האם למחוק את תת המשימה?",
     "confirm-checklist-delete-dialog": "האם אתה בטוח שברצונך למחוק את רשימת המשימות?",

+ 2 - 0
i18n/hu.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Megjegyzés írása",
     "comment-only": "Csak megjegyzés",
     "comment-only-desc": "Csak megjegyzést írhat a kártyákhoz.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Számítógép",
     "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?",
     "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",

+ 2 - 0
i18n/hy.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Write Comment",
     "comment-only": "Comment only",
     "comment-only-desc": "Can comment on cards only.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Computer",
     "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?",
     "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",

+ 2 - 0
i18n/id.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Write Comment",
     "comment-only": "Hanya komentar",
     "comment-only-desc": "Bisa komen hanya di kartu",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Komputer",
     "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?",
     "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",

+ 2 - 0
i18n/ig.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Write Comment",
     "comment-only": "Comment only",
     "comment-only-desc": "Can comment on cards only.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Computer",
     "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?",
     "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",

+ 2 - 0
i18n/it.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Scrivi Commento",
     "comment-only": "Solo commenti",
     "comment-only-desc": "Puoi commentare solo le schede.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Computer",
     "confirm-subtask-delete-dialog": "Sei sicuro di voler eliminare il sotto-compito?",
     "confirm-checklist-delete-dialog": "Sei sicuro di voler eliminare la checklist?",

+ 2 - 0
i18n/ja.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "コメントを書く",
     "comment-only": "コメントのみ",
     "comment-only-desc": "カードにのみコメント可能",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "コンピューター",
     "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?",
     "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",

+ 2 - 0
i18n/ka.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "დაწერეთ კომენტარი",
     "comment-only": "მხოლოდ კომენტარები",
     "comment-only-desc": "თქვენ შეგიძლიათ კომენტარის გაკეთება მხოლოდ ბარათებზე.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "კომპიუტერი",
     "confirm-subtask-delete-dialog": "დარწმუნებული ხართ, რომ გსურთ ქვესაქმიანობის წაშლა? ",
     "confirm-checklist-delete-dialog": "დარწმუნებული ხართ, რომ გსურთ კატალოგის წაშლა ? ",

+ 2 - 0
i18n/km.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Write Comment",
     "comment-only": "Comment only",
     "comment-only-desc": "Can comment on cards only.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Computer",
     "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?",
     "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",

+ 2 - 0
i18n/ko.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "댓글 입력",
     "comment-only": "댓글만 입력 가능",
     "comment-only-desc": "카드에 댓글만 달수 있습니다.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "내 컴퓨터",
     "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?",
     "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",

+ 2 - 0
i18n/lv.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Write Comment",
     "comment-only": "Comment only",
     "comment-only-desc": "Can comment on cards only.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Computer",
     "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?",
     "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",

+ 2 - 0
i18n/mn.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Write Comment",
     "comment-only": "Comment only",
     "comment-only-desc": "Can comment on cards only.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Computer",
     "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?",
     "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",

+ 2 - 0
i18n/nb.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Write Comment",
     "comment-only": "Comment only",
     "comment-only-desc": "Can comment on cards only.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Computer",
     "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?",
     "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",

+ 2 - 0
i18n/nl.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Schrijf reactie",
     "comment-only": "Alleen reageren",
     "comment-only-desc": "Kan alleen op kaarten reageren.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Computer",
     "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?",
     "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",

+ 2 - 0
i18n/pl.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Dodaj komentarz",
     "comment-only": "Comment only",
     "comment-only-desc": "Can comment on cards only.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Komputer",
     "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?",
     "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",

+ 2 - 0
i18n/pt-BR.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Escrever Comentário",
     "comment-only": "Somente comentários",
     "comment-only-desc": "Pode comentar apenas em cartões.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Computador",
     "confirm-subtask-delete-dialog": "Tem certeza que deseja deletar a subtarefa?",
     "confirm-checklist-delete-dialog": "Tem certeza que quer deletar o checklist?",

+ 2 - 0
i18n/pt.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Write Comment",
     "comment-only": "Comment only",
     "comment-only-desc": "Can comment on cards only.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Computador",
     "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?",
     "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",

+ 2 - 0
i18n/ro.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Write Comment",
     "comment-only": "Comment only",
     "comment-only-desc": "Can comment on cards only.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Computer",
     "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?",
     "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",

+ 2 - 0
i18n/ru.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Написать комментарий",
     "comment-only": "Только комментирование",
     "comment-only-desc": "Может комментировать только карточки.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Загрузить с компьютера",
     "confirm-subtask-delete-dialog": "Вы уверены, что хотите удалить подзадачу?",
     "confirm-checklist-delete-dialog": "Вы уверены, что хотите удалить чеклист?",

+ 2 - 0
i18n/sr.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Write Comment",
     "comment-only": "Comment only",
     "comment-only-desc": "Can comment on cards only.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Computer",
     "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?",
     "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",

+ 2 - 0
i18n/sv.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Skriv kommentar",
     "comment-only": "Kommentera endast",
     "comment-only-desc": "Kan endast kommentera kort.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Dator",
     "confirm-subtask-delete-dialog": "Är du säker på att du vill radera deluppgift?",
     "confirm-checklist-delete-dialog": "Är du säker på att du vill radera checklista?",

+ 2 - 0
i18n/ta.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Write Comment",
     "comment-only": "Comment only",
     "comment-only-desc": "Can comment on cards only.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Computer",
     "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?",
     "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",

+ 2 - 0
i18n/th.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Write Comment",
     "comment-only": "Comment only",
     "comment-only-desc": "Can comment on cards only.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "คอมพิวเตอร์",
     "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?",
     "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",

+ 10 - 8
i18n/tr.i18n.json

@@ -50,7 +50,7 @@
     "add-board": "Pano Ekle",
     "add-card": "Kart Ekle",
     "add-swimlane": "Kulvar Ekle",
-    "add-subtask": "Add Subtask",
+    "add-subtask": "Alt Görev Ekle",
     "add-checklist": "Yapılacak Listesi Ekle",
     "add-checklist-item": "Yapılacak listesine yeni bir öğe ekle",
     "add-cover": "Kapak resmi ekle",
@@ -103,7 +103,7 @@
     "boardMenuPopup-title": "Pano menüsü",
     "boards": "Panolar",
     "board-view": "Pano Görünümü",
-    "board-view-cal": "Calendar",
+    "board-view-cal": "Takvim",
     "board-view-swimlanes": "Kulvarlar",
     "board-view-lists": "Listeler",
     "bucket-example": "Örn: \"Marketten Alacaklarım\"",
@@ -149,7 +149,7 @@
     "changePasswordPopup-title": "Parola Değiştir",
     "changePermissionsPopup-title": "Yetkileri Değiştirme",
     "changeSettingsPopup-title": "Ayarları değiştir",
-    "subtasks": "Subtasks",
+    "subtasks": "Alt Görevler",
     "checklists": "Yapılacak Listeleri",
     "click-to-star": "Bu panoyu yıldızlamak için tıkla.",
     "click-to-unstar": "Bu panunun yıldızını kaldırmak için tıkla.",
@@ -171,6 +171,8 @@
     "comment-placeholder": "Yorum Yaz",
     "comment-only": "Sadece yorum",
     "comment-only-desc": "Sadece kartlara yorum yazabilir.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Bilgisayar",
     "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?",
     "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",
@@ -267,7 +269,7 @@
     "headerBarCreateBoardPopup-title": "Pano Oluşturma",
     "home": "Ana Sayfa",
     "import": "İçeri aktar",
-    "link": "Link",
+    "link": "Bağlantı",
     "import-board": "panoyu içe aktar",
     "import-board-c": "Panoyu içe aktar",
     "import-board-title-trello": "Trello'dan panoyu içeri aktar",
@@ -483,15 +485,15 @@
     "card-end-on": "Bitiş zamanı",
     "editCardReceivedDatePopup-title": "Giriş tarihini değiştir",
     "editCardEndDatePopup-title": "Bitiş tarihini değiştir",
-    "assigned-by": "Assigned By",
-    "requested-by": "Requested By",
+    "assigned-by": "Atamayı yapan",
+    "requested-by": "Talep Eden",
     "board-delete-notice": "Deleting is permanent. You will lose all lists, cards and actions associated with this board.",
     "delete-board-confirm-popup": "All lists, cards, labels, and activities will be deleted and you won't be able to recover the board contents. There is no undo.",
     "boardDeletePopup-title": "Delete Board?",
     "delete-board": "Delete Board",
     "default-subtasks-board": "Subtasks for __board__ board",
-    "default": "Default",
-    "queue": "Queue",
+    "default": "Varsayılan",
+    "queue": "Sıra",
     "subtask-settings": "Subtasks Settings",
     "boardSubtaskSettingsPopup-title": "Board Subtasks Settings",
     "show-subtasks-field": "Cards can have subtasks",

+ 2 - 0
i18n/uk.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Write Comment",
     "comment-only": "Comment only",
     "comment-only-desc": "Can comment on cards only.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Computer",
     "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?",
     "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",

+ 2 - 0
i18n/vi.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "Write Comment",
     "comment-only": "Comment only",
     "comment-only-desc": "Can comment on cards only.",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "Computer",
     "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?",
     "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",

+ 2 - 0
i18n/zh-CN.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "添加评论",
     "comment-only": "仅能评论",
     "comment-only-desc": "只能在卡片上评论。",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "从本机上传",
     "confirm-subtask-delete-dialog": "确定要删除子任务吗?",
     "confirm-checklist-delete-dialog": "确定要删除清单吗?",

+ 2 - 0
i18n/zh-TW.i18n.json

@@ -171,6 +171,8 @@
     "comment-placeholder": "新增評論",
     "comment-only": "只可以發表評論",
     "comment-only-desc": "只可以對卡片發表評論",
+    "no-comments": "No comments",
+    "no-comments-desc": "Can not see comments and activities.",
     "computer": "從本機上傳",
     "confirm-subtask-delete-dialog": "Are you sure you want to delete subtask?",
     "confirm-checklist-delete-dialog": "Are you sure you want to delete checklist?",

+ 12 - 1
models/boards.js

@@ -110,6 +110,7 @@ Boards.attachSchema(new SimpleSchema({
           userId: this.userId,
           isAdmin: true,
           isActive: true,
+          isNoComments: false,
           isCommentOnly: false,
         }];
       }
@@ -124,6 +125,9 @@ Boards.attachSchema(new SimpleSchema({
   'members.$.isActive': {
     type: Boolean,
   },
+  'members.$.isNoComments': {
+    type: Boolean,
+  },
   'members.$.isCommentOnly': {
     type: Boolean,
   },
@@ -292,6 +296,10 @@ Boards.helpers({
     return !!_.findWhere(this.members, { userId: memberId, isActive: true, isAdmin: true });
   },
 
+  hasNoComments(memberId) {
+    return !!_.findWhere(this.members, { userId: memberId, isActive: true, isAdmin: false, isNoComments: true });
+  },
+
   hasCommentOnly(memberId) {
     return !!_.findWhere(this.members, { userId: memberId, isActive: true, isAdmin: false, isCommentOnly: true });
   },
@@ -501,6 +509,7 @@ Boards.mutations({
           userId: memberId,
           isAdmin: false,
           isActive: true,
+          isNoComments: false,
           isCommentOnly: false,
         },
       },
@@ -528,7 +537,7 @@ Boards.mutations({
     };
   },
 
-  setMemberPermission(memberId, isAdmin, isCommentOnly) {
+  setMemberPermission(memberId, isAdmin, isNoComments, isCommentOnly) {
     const memberIndex = this.memberIndex(memberId);
 
     // do not allow change permission of self
@@ -539,6 +548,7 @@ Boards.mutations({
     return {
       $set: {
         [`members.${memberIndex}.isAdmin`]: isAdmin,
+        [`members.${memberIndex}.isNoComments`]: isNoComments,
         [`members.${memberIndex}.isCommentOnly`]: isCommentOnly,
       },
     };
@@ -838,6 +848,7 @@ if (Meteor.isServer) {
             userId: req.body.owner,
             isAdmin: true,
             isActive: true,
+            isNoComments: false,
             isCommentOnly: false,
           },
         ],

+ 3 - 3
models/lists.js

@@ -63,13 +63,13 @@ Lists.attachSchema(new SimpleSchema({
 
 Lists.allow({
   insert(userId, doc) {
-    return allowIsBoardMemberNonComment(userId, Boards.findOne(doc.boardId));
+    return allowIsBoardMemberCommentOnly(userId, Boards.findOne(doc.boardId));
   },
   update(userId, doc) {
-    return allowIsBoardMemberNonComment(userId, Boards.findOne(doc.boardId));
+    return allowIsBoardMemberCommentOnly(userId, Boards.findOne(doc.boardId));
   },
   remove(userId, doc) {
-    return allowIsBoardMemberNonComment(userId, Boards.findOne(doc.boardId));
+    return allowIsBoardMemberCommentOnly(userId, Boards.findOne(doc.boardId));
   },
   fetch: ['boardId'],
 });

+ 3 - 3
models/swimlanes.js

@@ -46,13 +46,13 @@ Swimlanes.attachSchema(new SimpleSchema({
 
 Swimlanes.allow({
   insert(userId, doc) {
-    return allowIsBoardMemberNonComment(userId, Boards.findOne(doc.boardId));
+    return allowIsBoardMemberCommentOnly(userId, Boards.findOne(doc.boardId));
   },
   update(userId, doc) {
-    return allowIsBoardMemberNonComment(userId, Boards.findOne(doc.boardId));
+    return allowIsBoardMemberCommentOnly(userId, Boards.findOne(doc.boardId));
   },
   remove(userId, doc) {
-    return allowIsBoardMemberNonComment(userId, Boards.findOne(doc.boardId));
+    return allowIsBoardMemberCommentOnly(userId, Boards.findOne(doc.boardId));
   },
   fetch: ['boardId'],
 });

+ 10 - 0
models/users.js

@@ -151,6 +151,16 @@ if (Meteor.isClient) {
       return board && board.hasMember(this._id);
     },
 
+    isNotNoComments() {
+      const board = Boards.findOne(Session.get('currentBoard'));
+      return board && board.hasMember(this._id) && !board.hasNoComments(this._id);
+    },
+
+    isNoComments() {
+      const board = Boards.findOne(Session.get('currentBoard'));
+      return board && board.hasNoComments(this._id);
+    },
+
     isNotCommentOnly() {
       const board = Boards.findOne(Session.get('currentBoard'));
       return board && board.hasMember(this._id) && !board.hasCommentOnly(this._id);

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "wekan",
-  "version": "1.39.0",
+  "version": "1.40.0",
   "description": "The open-source kanban",
   "private": true,
   "scripts": {

+ 2 - 2
sandstorm-pkgdef.capnp

@@ -22,10 +22,10 @@ const pkgdef :Spk.PackageDefinition = (
     appTitle = (defaultText = "Wekan"),
     # The name of the app as it is displayed to the user.
 
-    appVersion = 124,
+    appVersion = 125,
     # Increment this for every release.
 
-    appMarketingVersion = (defaultText = "1.39.0~2018-08-29"),
+    appMarketingVersion = (defaultText = "1.40.0~2018-09-04"),
     # Human-readable presentation of the app version.
 
     minUpgradableAppVersion = 0,

+ 2 - 1
sandstorm.js

@@ -208,7 +208,8 @@ if (isSandstorm && Meteor.isServer) {
     const isActive = permissions.indexOf('participate') > -1;
     const isAdmin = permissions.indexOf('configure') > -1;
     const isCommentOnly = false;
-    const permissionDoc = { userId, isActive, isAdmin, isCommentOnly };
+    const isNoComments = false;
+    const permissionDoc = { userId, isActive, isAdmin, isNoComments, isCommentOnly };
 
     const boardMembers = Boards.findOne(sandstormBoard._id).members;
     const memberIndex = _.pluck(boardMembers, 'userId').indexOf(userId);

+ 5 - 1
server/lib/utils.js

@@ -6,10 +6,14 @@ allowIsBoardMember = function(userId, board) {
   return board && board.hasMember(userId);
 };
 
-allowIsBoardMemberNonComment = function(userId, board) {
+allowIsBoardMemberCommentOnly = function(userId, board) {
   return board && board.hasMember(userId) && !board.hasCommentOnly(userId);
 };
 
+allowIsBoardMemberNoComments = function(userId, board) {
+  return board && board.hasMember(userId) && !board.hasNoComments(userId);
+};
+
 allowIsBoardMemberByCard = function(userId, card) {
   const board = card.board();
   return board && board.hasMember(userId);