Package org.fao.geonet.kernel

Examples of org.fao.geonet.kernel.AccessManager.canEdit()


      throws Exception {
    GeonetContext gc = (GeonetContext) context
        .getHandlerContext(Geonet.CONTEXT_NAME);
    AccessManager am = gc.getBean(AccessManager.class);

    if (!am.canEdit(context, id))
      denyAccess(context);
  }

  /**
   * @return the absolute path of the folder choosen to store all deleted
View Full Code Here


        int iLocalId = Integer.parseInt(id);
        if (!dataMan.existsMetadata(iLocalId)) {
            throw new IllegalArgumentException("Metadata with identifier '" + id + "' not found.");
        }

        if (!accessMan.canEdit(context, id)) {
            throw new OperationNotAllowedEx();
        }

        int iGroupOwner = Integer.parseInt(groupOwner);
        Group group = context.getBean(GroupRepository.class).findOne(iGroupOwner);
View Full Code Here

    Element md = dataMan.getMetadataNoInfo(context, id);

    if (md == null)
      throw new IllegalArgumentException("Metadata not found --> " + id);

    if (!accessMan.canEdit(context, id))
      throw new OperationNotAllowedEx();

    //-----------------------------------------------------------------------
    //--- set metadata into the subversion repo
View Full Code Here

        Metadata metadata = context.getBean(MetadataRepository.class).findOne(id);

    if (metadata == null)
      throw new IllegalArgumentException("Metadata with identifier " + id + " not found.");

    if (!accessMan.canEdit(context, id))
      throw new OperationNotAllowedEx();

    //-----------------------------------------------------------------------
    //--- backup metadata in 'removed' folder
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.