From fbbaa2a5c9646bf832879fe700d117eaa11e7df3 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Tue, 9 Mar 2010 18:43:13 +0100 Subject: [PATCH] Looks like js needs parenthesis here to get the operator order right. --- kronolith/js/kronolith.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; } -- 2.11.0