Package edu.uga.galileo.voci.model

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


                .getParameter("includeExtras") == null ? false
                : true;
            for (int m = results.size() - 1; m >= 0; m--) {
              result = results.get(m);
              try {
                if (wm.canEdit(user, pm.getProjectHandle(result
                    .getProjectId()), ContentType.valueOf(
                    result.getVBO().getType()).getPlural(),
                    result.getVBO().getId())) {
                  result.setUserEditable(true);
                } else if (!includeExtras) {
View Full Code Here


      // this is a basic workflow check, and it only makes sure that the
      // user is allowed to perform administration on the requested
      // content type. specific item editing-related checks should be
      // done in the respective servlets.
      if (wm
          .canEdit(user, command.getProject(), command.getCommand(),
              -1)) {
        // user can manage command, so all's well
        Logger.debug("user '" + user.getUserName() + "' is an admin");
        return false;
View Full Code Here

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

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

    int parentId = -1;
    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 "
            + "subcommunity to the requested community.");
        goToList = true;
      } else {
View Full Code Here

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

      bundle = bundleManager.getBundle(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 "
              + "bundle to the requested object.");
          goToList = true;
        } else {
View Full Code Here

    WorkflowManager workflowManager = new WorkflowManager();
    Bundle bundle = null;

    try {
      int bundleId = Integer.parseInt(command.getOther().get(0));
      if (!workflowManager.canEdit(user, command.getProject(), command
          .getCommand(), bundleId)) {
        errors.add("You don't have permission to delete "
            + "the requested bundle.");
      } else {
        try {
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 "
            + "bundle to the requested object.");
        goToList = true;
      } else {
View Full Code Here

            goToList = true;
          }
        } else {
          // this is an existing bundle
          // first make sure that the user can edit it
          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

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.