I have an issue with the working of API call $isUserInGroup.
Imagine the group Employees consisting of two subgroups: Drones and
Management. Each employee is in one of those groups. When a space has
view rights for Employees, members of both groups have access.
When I check ($xwiki.user.isUserInGroup('XWiki.Employees') however for
a manager, I get a negative response, because the user is not in the
group XWiki.Employees.
My work-around: create a page/space where Employees has access to, and
use this call: $xwiki.hasAccessLevel("view", $context.user,
"Intranet.WebHome")
Hope this helps those who don't understand why the call is giving a
negative result ;)
Kind regards, Joris