docs: public boolean shouldDisplayLayoutLink(
              IPerson person, PortletDefinitionForm form, String portletId) {
          if (!form.isNew()) {
              return false;
          }
  
          // only include the "do layout" link for published portlets.
          if (form.getLifecycleState() != PortletLifecycleState.PUBLISHED) {
              return false;
          }
  
          // check that the user can edit at least 1 fragment.
          Map<String, String> layouts =
                  fragmentAdminHelper.getAuthorizedDlmFragments(person.getUserName());
          if (layouts == null || layouts.isEmpty()) {
              return false;
          }
  
          // check that the user has subscribe priv.
          IAuthorizationPrincipal authPrincipal =
                  authorizationService.newPrincipal(
                          person.getUserName(), EntityEnum.PERSON.getClazz());
  
          return authPrincipal.canSubscribe(portletId);
      }