code: protected Set<String> getPermittedOwnAttributes(
              final IAuthorizationPrincipal principal,
              final Set<String> generallyPermittedAttributes) {
  
          // The permttedOwnAttributes collection includes all the generallyPermittedAttributes
          final Set<String> rslt = new HashSet<>(generallyPermittedAttributes);
  
          for (String attr : personAttributeDao.getPossibleUserAttributeNames()) {
              if (principal.hasPermission(
                      IPermission.PORTAL_USERS, IPermission.VIEW_OWN_USER_ATTRIBUTE_ACTIVITY, attr)) {
                  rslt.add(attr);
              }
          }
  
          return rslt;
      }
docs: Provide a complete set of user attribute names that the specified principal may view within
  his or her own collection. These will be attributes for which the user has <em>either</em>
  <code>IPermission.VIEW_USER_ATTRIBUTE_ACTIVITY</code> or <code>
  IPermission.VIEW_OWN_USER_ATTRIBUTE_ACTIVITY</code>.
  
  @param principal Represents a portal user who wishes to view user attributes
  @param generallyPermittedAttributes The collection of user attribute name this user may view
  for any visible user
  @since 5.0