docs: public boolean isValueVisible(
          CmsObject cms,
          I_CmsXmlSchemaType value,
          String elementName,
          String params,
          CmsResource resource,
          Locale contentLocale) {
  
          CmsUser user = cms.getRequestContext().getCurrentUser();
          boolean result = false;
  
          try {
              List<CmsRole> roles = OpenCms.getRoleManager().getRolesOfUser(cms, user.getName(), "", true, false, true);
              List<CmsGroup> groups = cms.getGroupsOfUser(user.getName(), false);
  
              String[] allowedPrincipals = params.split("\\|");
              List<String> groupNames = new ArrayList<String>();
              List<String> roleNames = new ArrayList<String>();
  
              for (CmsGroup group : groups) {
                  groupNames.add(group.getName());
              }
              for (CmsRole role : roles) {
                  roleNames.add(role.getRoleName());
              }
              for (String principal : allowedPrincipals) {
                  if (CmsRole.hasPrefix(principal)) {
                      // prefixed as a role
                      principal = CmsRole.removePrefix(principal);
                      if (roleNames.contains(principal)) {
                          result = true;
                          break;
                      }
                  } else {
                      // otherwise we always assume this is a group, will work if prefixed or not
                      principal = CmsGroup.removePrefix(principal);
                      if (groupNames.contains(principal)) {
                          result = true;
                          break;
                      }
                  }
              }
          } catch (CmsException e) {
              LOG.error(e.getLocalizedMessage(), e);
          }
  
          return result;
      }