From: Jan Schneider Date: Tue, 9 Mar 2010 17:43:13 +0000 (+0100) Subject: Looks like js needs parenthesis here to get the operator order right. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=fbbaa2a5c9646bf832879fe700d117eaa11e7df3;p=horde.git Looks like js needs parenthesis here to get the operator order right. --- diff --git a/kronolith/js/kronolith.js b/kronolith/js/kronolith.js index c8d39b2c3..1ffbc0937 100644 --- a/kronolith/js/kronolith.js +++ b/kronolith/js/kronolith.js @@ -2354,7 +2354,7 @@ KronolithCore = { } else if (Object.isUndefined(basic) && same == perm.value && (perm.value == Kronolith.conf.perms.read || - perm.value == Kronolith.conf.perms.read | Kronolith.conf.perms.show)) { + perm.value == (Kronolith.conf.perms.read | Kronolith.conf.perms.show))) { basic = perm.value == Kronolith.conf.perms.read ? 'all_read' : 'all_show'; } else if (perm.value != 0) { advanced = true; @@ -2373,9 +2373,9 @@ KronolithCore = { }, this); if (Object.isUndefined(basic) && $H(perm.value).size() == 1 && - (groupPerms == Kronolith.conf.perms.show | Kronolith.conf.perms.read || - groupPerms == Kronolith.conf.perms.show | Kronolith.conf.perms.read | Kronolith.conf.perms.edit)) { - basic = groupPerms == Kronolith.conf.perms.show | Kronolith.conf.perms.read ? 'group_read' : 'group_edit'; + (groupPerms == (Kronolith.conf.perms.show | Kronolith.conf.perms.read) || + groupPerms == (Kronolith.conf.perms.show | Kronolith.conf.perms.read | Kronolith.conf.perms.edit))) { + basic = groupPerms == (Kronolith.conf.perms.show | Kronolith.conf.perms.read) ? 'group_read' : 'group_edit'; } else { advanced = true; }