Package edu.uga.galileo.voci.model

Examples of edu.uga.galileo.voci.model.WorkflowManager.canEdit()


    String[] vals = command.getOther().get(0).split("\\|");
    AuditLogManager alm = new AuditLogManager();
    int bundleId = -1;
    try {
      bundleId = Integer.parseInt(vals[2]);
      if (!workflowManager.canEdit(user, command.getProject(), command
          .getCommand(), bundleId)) {
        errors.add("You don't have permission to edit "
            + "the requested bundle.");
        goToList = true;
      } else {
View Full Code Here


    if ((collection != null)
        && (!command.isViewCommand())
        && (errors.size() == 0)
        && (fieldMessages.size() == 0)
        && (!goToList)
        && (!workflowManager.canEdit(user, command.getProject(),
            command.getCommand(), collection.getCollectionId()))) {
      errors.add("You don't have permission to "
          + "work on the requested content.");
      goToList = true;
    }
View Full Code Here

      collection = collectionManager.getCollection(command, -1, false);
      if ((command.getOther() != null)
          && (command.getOther().get(0).equals("to"))) {
        int parentId = Integer.parseInt(command.getOther().get(1));
        // verify that the user can edit the requested parent
        if (!workflowManager.canEdit(user, command.getProject(),
            command.getCommand(), parentId)) {
          errors.add("You don't have permission to add a "
              + "collection to the requested object.");
          goToList = true;
        } else {
View Full Code Here

    int parentId = -1;
    boolean goToList = false;
    if (request.getParameter("parentId") != null) {
      parentId = Integer.parseInt(request.getParameter("parentId"));
      // verify that the user can edit the requested parent
      if (!workflowManager.canEdit(user, command.getProject(), command
          .getCommand(), parentId)) {
        errors.add("You don't have permission to add a "
            + "collection to the requested object.");
        goToList = true;
      } else {
View Full Code Here

            goToList = true;
          }
        } else {
          // this is an existing collection
          // first make sure that the user can edit it
          if (!workflowManager.canEdit(user, command.getProject(),
              command.getCommand(), collectionId)) {
            errors.add("You don't have permission to edit "
                + "the requested collection.");
            goToList = true;
          } else {
View Full Code Here

    WorkflowManager workflowManager = new WorkflowManager();
    Collection collection = null;

    try {
      int collectionId = Integer.parseInt(command.getOther().get(0));
      if (!workflowManager.canEdit(user, command.getProject(), command
          .getCommand(), collectionId)) {
        errors.add("You don't have permission to delete "
            + "the requested collection.");
      } else {
        try {
View Full Code Here

    String[] vals = command.getOther().get(0).split("\\|");
    AuditLogManager alm = new AuditLogManager();
    int collectionId = -1;
    try {
      collectionId = Integer.parseInt(vals[2]);
      if (!workflowManager.canEdit(user, command.getProject(), command
          .getCommand(), collectionId)) {
        errors.add("You don't have permission to edit "
            + "the requested collection.");
        goToList = true;
      } else {
View Full Code Here

        item = itemManager.getItem(command, -1, false);
        if ((command.getOther() != null)
            && (command.getOther().get(0).equals("to"))) {
          int parentId = Integer.parseInt(command.getOther().get(1));
          // verify that the user can edit the requested parent
          if (!workflowManager.canEdit(user, command.getProject(),
              command.getCommand(), parentId)) {
            errors.add("You don't have permission to add a "
                + "item to the requested object.");
            goToList = true;
          } else {
View Full Code Here

    } else if ((command.getModifier() != null)
        && (command.getModifier().equals("delete"))) {
      // user is deleting an item
      try {
        int itemId = Integer.parseInt(command.getOther().get(0));
        if (!workflowManager.canEdit(user, command.getProject(),
            command.getCommand(), itemId)) {
          errors.add("You don't have permission to delete "
              + "the requested item.");
        } else {
          try {
View Full Code Here

      int parentId = -1;
      goToList = false;
      if (request.getParameter("parentId") != null) {
        parentId = Integer.parseInt(request.getParameter("parentId"));
        // verify that the user can edit the requested parent
        if (!workflowManager.canEdit(user, command.getProject(),
            command.getCommand(), parentId)) {
          errors.add("You don't have permission to add a "
              + "item to the requested object.");
          goToList = true;
        } else {
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.