Like Mart said, the missing end ifs are probably your problem. Assuming she is not a member of group-junior, kix fails the first if and is searching for the endif. Since it doesn't find it, it never executes the group-admin if.