docs: private String getPermissionString(CmsObject cms, CmsResource res, DialogType type) throws CmsException {
  
          if (type.equals(DialogType.User)) {
              cms.getPermissions(res.getRootPath(), m_principal.getName()).getPermissionString();
          } else if (type.equals(DialogType.Group)) {
              Iterator<CmsAccessControlEntry> itAces = cms.getAccessControlEntries(res.getRootPath(), false).iterator();
              while (itAces.hasNext()) {
                  CmsAccessControlEntry ace = itAces.next();
                  if (ace.getPrincipal().equals(m_principal.getId())) {
                      return ace.getPermissions().getPermissionString();
                  }
              }
          }
          return "";
      }