From 64b34da425eb80a5e4dfe3a233229f76fc47b580 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 18 Mar 2021 14:21:13 +0300 Subject: [PATCH] Comment groups: allow all actions, when view/edit/remove field is undefined --- apps/common/main/lib/util/utils.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/common/main/lib/util/utils.js b/apps/common/main/lib/util/utils.js index 919b3876c..56df35ac8 100644 --- a/apps/common/main/lib/util/utils.js +++ b/apps/common/main/lib/util/utils.js @@ -1063,7 +1063,7 @@ Common.Utils.UserInfoParser = new(function() { }, canViewComment: function(username) { - if (!parse || !commentGroups) return true; + if (!parse || !commentGroups || !commentGroups.view) return true; var groups = _getParsedGroups(username); groups && (groups.length==0) && (groups = [""]); @@ -1071,7 +1071,7 @@ Common.Utils.UserInfoParser = new(function() { }, canEditComment: function(username) { - if (!parse || !commentGroups) return true; + if (!parse || !commentGroups || !commentGroups.edit) return true; var groups = _getParsedGroups(username); groups && (groups.length==0) && (groups = [""]); @@ -1079,7 +1079,7 @@ Common.Utils.UserInfoParser = new(function() { }, canDeleteComment: function(username) { - if (!parse || !commentGroups) return true; + if (!parse || !commentGroups || !commentGroups.remove) return true; var groups = _getParsedGroups(username); groups && (groups.length==0) && (groups = [""]);