docs: public boolean hasRole(CmsDbContext dbc, CmsUser user, CmsRole role) {
  
          // try to read from cache
          String key = user.getName().toString() + role.getGroupName() + role.getOuFqn();
          Boolean result = OpenCms.getMemoryMonitor().getCachedRole(key);
          if (result != null) {
              return result.booleanValue();
          }
  
          // read all roles of the current user
          List<CmsGroup> roles;
          try {
              roles = m_driverManager.getGroupsOfUser(
                  dbc,
                  user.getName(),
                  "",
                  true,
                  true,
                  false,
                  dbc.getRequestContext().getRemoteAddress());
          } catch (CmsException e) {
              if (LOG.isErrorEnabled()) {
                  LOG.error(e.getLocalizedMessage(), e);
              }
              // any exception: return false
              return false;
          }
  
          boolean hasRole = hasRole(role, roles);
  
          // hack: require individual user based confirmation for certain roles
          // this is for updated older systems where content managers have been WORKPLACE_USER only
          // to prevent access to certain ADE management functions
          if (hasRole && ((CmsRole.CATEGORY_EDITOR.equals(role)) || (CmsRole.GALLERY_EDITOR.equals(role)))) {
              String info = CmsRole.CONFIRM_ROLE_PREFIX + role.getRoleName();
              Object prop = OpenCms.getRuntimeProperty(info);
              if ((prop != null) && Boolean.valueOf(prop.toString()).booleanValue()) {
                  // individual user based confirmation for the role is required
                  // if the user is a WORKPLACE_USER
                  Object val = user.getAdditionalInfo(info);
                  if ((val == null) || !Boolean.valueOf(val.toString()).booleanValue()) {
                      // no individual user confirmation present
                      if (hasRole(CmsRole.WORKPLACE_USER, roles)
                          && !hasRole(CmsRole.DEVELOPER, roles)
                          && !hasRole(CmsRole.PROJECT_MANAGER, roles)
                          && !hasRole(CmsRole.ACCOUNT_MANAGER, roles)) {
                          // user is a WORKPLACE_USER, confirmation is required but not present
                          hasRole = false;
                      }
                  }
              }
          }
  
          result = Boolean.valueOf(hasRole);
          OpenCms.getMemoryMonitor().cacheRole(key, result.booleanValue());
          return result.booleanValue();
      }