code: boolean isEditable(CmsObject cms, CmsResource resource) {
  
          try {
              return cms.hasPermissions(resource, CmsPermissionSet.ACCESS_WRITE, false, CmsResourceFilter.ALL);
          } catch (CmsException e) {
              return false;
          }
      }
docs: Checks if the current user has write permissions on the given resource.<p>
  
  @param cms the current cms context
  @param resource the resource to check
  
  @return <code>true</code> if the current user has write permissions on the given resource