code: protected boolean canEdit(CmsUUID id) {
  
          CmsObject cms = A_CmsUI.getCmsObject();
          CmsResource res = null;
          try {
              res = cms.readResource(id, CmsResourceFilter.ALL);
              boolean result = CmsPropertiesDialogAction.VISIBILITY.getVisibility(
                  A_CmsUI.getCmsObject(),
                  Lists.newArrayList(res)).isActive();
              return result;
          } catch (CmsException e) {
              LOG.error(e.getLocalizedMessage(), e);
              return false;
          }
      }
docs: Checks if the user can edit the resource with the given id.<p>
  
  @param id a structure id
  @return true if the user can edit the file