code: public static String getPrincipalNameFromACE(CmsObject cms, CmsAccessControlEntry entry) {
  
          if (entry.isAllOthers()) {
              return CmsAccessControlEntry.PRINCIPAL_ALL_OTHERS_NAME;
          }
          if (entry.isOverwriteAll()) {
              return CmsAccessControlEntry.PRINCIPAL_OVERWRITE_ALL_NAME;
          }
          CmsRole role = CmsRole.valueOfId(entry.getPrincipal());
          if (role != null) {
              return role.getRoleName();
          } else {
              try {
                  return CmsPrincipal.readPrincipal(cms, entry.getPrincipal()).getName();
              } catch (CmsException e) {
                  //
              }
          }
          return "";
      }
docs: Get name of principal from ACE.<p>
  
  @param cms CmsObject
  @param entry ACE
  @return principal name