diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 60833d79d..b32b66e34 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -1,7 +1,7 @@ 6.5.3 - fix [ 1161457 ] Data fomr - list all entries: Logfile Error - fix [ 1161461 ] Data form - Add field - wrong destination - + - fix [ 1149585 ] visitor as admin 6.5.2 diff --git a/lib/WebGUI/Grouping.pm b/lib/WebGUI/Grouping.pm index 2aaedec79..00933a5c0 100755 --- a/lib/WebGUI/Grouping.pm +++ b/lib/WebGUI/Grouping.pm @@ -333,7 +333,9 @@ sub isInGroup { $uid = $session{user}{userId} if ($uid eq ""); ### The following several checks are to increase performance. If this section were removed, everything would continue to work as normal. return 1 if ($gid eq '7'); # everyone is in the everyone group - return 1 if ($gid eq '1' && $uid eq '1'); # visitors are in the visitors group + return 1 if ($gid eq '1' && $uid eq '1'); # visitors are in the visitors group + return 0 if ($uid eq '1'); #Visitor is in no other groups + return 1 if ($uid eq '3'); #Admin is in every group return 1 if ($gid eq '2' && $uid ne '1'); # if you're not a visitor, then you're a registered user ### Look to see if we've already looked up this group. if ($session{isInGroup}{$uid}{$gid} eq '1') {