code: public boolean isCanPublish() {
  
          return OpenCms.getWorkplaceManager().getDefaultUserSettings().isAllowBrokenRelations()
              || OpenCms.getRoleManager().hasRole(getCms(), CmsRole.VFS_MANAGER);
      }
docs: Returns <code>true</code> if the current user is allowed
  to publish the selected resources.<p>
  
  @return <code>true</code> if the current user is allowed
  to publish the selected resources