code: public boolean hasPermission(CmsObject cms, CmsResource folder) {
  
          if ((m_explorerType != null) && (folder != null)) {
              CmsPermissionSet permSet = m_explorerType.getAccess().getPermissions(cms, folder);
              boolean result = permSet.requiresViewPermission();
              return result;
          }
  
          try {
              if (m_resource != null) {
                  return cms.hasPermissions(
                      m_resource,
                      CmsPermissionSet.ACCESS_VIEW,
                      false,
                      CmsResourceFilter.IGNORE_EXPIRATION.addRequireVisible());
              } else {
                  return OpenCms.getRoleManager().hasRole(cms, CmsRole.ELEMENT_AUTHOR);
              }
  
          } catch (CmsException e) {
              LOG.error(e.getLocalizedMessage(), e);
          }
          return false;
      }
docs: Checks whether the current user has permissions to use the element view.<p>
  
  @param cms the cms context
  @param folder used for permission checks for explorertype based views
  
  @return <code>true</code> if the current user has permissions to use the element view