docs: @Override
      public boolean isUserInRole(String role) {
          if (super.getSession(false) == null) {
              return super.isUserInRole(role);
          }
  
          // Check the wrapped request first
          final boolean isUserInRole = super.isUserInRole(role);
          if (isUserInRole) {
              return true;
          }
  
          // Find the group for the role, if not found return false
          IEntityGroup groupForRole = GroupService.findGroup(role);
          if (groupForRole == null) {
              final EntityIdentifier[] results =
                      GroupService.searchForGroups(
                              role, GroupService.SearchMethod.DISCRETE, IPerson.class);
              if (results == null || results.length == 0) {
                  return false;
              }
  
              if (results.length > 1) {
                  this.logger.warn(
                          results.length
                                  + " groups were found for role '"
                                  + role
                                  + "'. The first result will be used.");
              }
  
              IGroupMember member = GroupService.getGroupMember(results[0]);
              if (member == null || !member.isGroup()) {
                  return false;
              }
              groupForRole = member.asGroup();
          }
  
          // Load the group information about the current user
          final IUserInstance userInstance =
                  this.userInstanceManager.getUserInstance(this.getWrappedRequest());
          final IPerson person = userInstance.getPerson();
          final EntityIdentifier personEntityId = person.getEntityIdentifier();
          final IGroupMember personGroupMember = GroupService.getGroupMember(personEntityId);
  
          final boolean rslt = personGroupMember.isDeepMemberOf(groupForRole);
          logger.trace(
                  "Answering {} for isUserInRole where user='{}', role='{}', and groupForRole='{}'",
                  rslt,
                  person.getUserName(),
                  role,
                  groupForRole.getName());
          return rslt;
      }