Examples of exceeds()


Examples of com.gitblit.Constants.AccessPermission.exceeds()

    List<RepositoryUrl> list = new ArrayList<RepositoryUrl>();
    // http/https url
    if (settings.getBoolean(Keys.git.enableGitServlet, true)) {
      AccessPermission permission = user.getRepositoryPermission(repository).permission;
      if (permission.exceeds(AccessPermission.NONE)) {
        list.add(new RepositoryUrl(getRepositoryUrl(request, username, repository), permission));
      }
    }

    // add all other urls
View Full Code Here

Examples of com.gitblit.Constants.AccessPermission.exceeds()

    // ssh daemon url
    String sshDaemonUrl = servicesManager.getSshDaemonUrl(request, user, repository);
    if (!StringUtils.isEmpty(sshDaemonUrl)) {
      AccessPermission permission = user.getRepositoryPermission(repository).permission;
      if (permission.exceeds(AccessPermission.NONE)) {
        if (permission.atLeast(AccessPermission.PUSH) && !acceptPush(Transport.SSH)) {
          // downgrade the repo permission for this transport
          // because it is not an acceptable PUSH transport
          permission = AccessPermission.CLONE;
        }
View Full Code Here

Examples of com.gitblit.Constants.AccessPermission.exceeds()

    // git daemon url
    String gitDaemonUrl = servicesManager.getGitDaemonUrl(request, user, repository);
    if (!StringUtils.isEmpty(gitDaemonUrl)) {
      AccessPermission permission = servicesManager.getGitDaemonAccessPermission(user, repository);
      if (permission.exceeds(AccessPermission.NONE)) {
        if (permission.atLeast(AccessPermission.PUSH) && !acceptPush(Transport.GIT)) {
          // downgrade the repo permission for this transport
          // because it is not an acceptable PUSH transport
          permission = AccessPermission.CLONE;
        }
View Full Code Here

Examples of com.gitblit.Constants.AccessPermission.exceeds()

    List<RepositoryUrl> list = new ArrayList<RepositoryUrl>();

    // http/https url
    if (settings.getBoolean(Keys.git.enableGitServlet, true)) {
      AccessPermission permission = user.getRepositoryPermission(repository).permission;
      if (permission.exceeds(AccessPermission.NONE)) {
        Transport transport = Transport.fromString(request.getScheme());
        if (permission.atLeast(AccessPermission.PUSH) && !acceptPush(transport)) {
          // downgrade the repo permission for this transport
          // because it is not an acceptable PUSH transport
          permission = AccessPermission.CLONE;
View Full Code Here

Examples of com.gitblit.Constants.AccessPermission.exceeds()

    List<RepositoryUrl> list = new ArrayList<RepositoryUrl>();
    // http/https url
    if (settings.getBoolean(Keys.git.enableGitServlet, true)) {
      AccessPermission permission = user.getRepositoryPermission(repository).permission;
      if (permission.exceeds(AccessPermission.NONE)) {
        list.add(new RepositoryUrl(getRepositoryUrl(request, username, repository), permission));
      }
    }

    // add all other urls
View Full Code Here

Examples of com.gitblit.Constants.AccessPermission.exceeds()

    List<RepositoryUrl> list = new ArrayList<RepositoryUrl>();

    // http/https url
    if (settings.getBoolean(Keys.git.enableGitServlet, true)) {
      AccessPermission permission = user.getRepositoryPermission(repository).permission;
      if (permission.exceeds(AccessPermission.NONE)) {
        Transport transport = Transport.fromString(request.getScheme());
        if (permission.atLeast(AccessPermission.PUSH) && !acceptPush(transport)) {
          // downgrade the repo permission for this transport
          // because it is not an acceptable PUSH transport
          permission = AccessPermission.CLONE;
View Full Code Here

Examples of com.gitblit.Constants.AccessPermission.exceeds()

    // ssh daemon url
    String sshDaemonUrl = servicesManager.getSshDaemonUrl(request, user, repository);
    if (!StringUtils.isEmpty(sshDaemonUrl)) {
      AccessPermission permission = user.getRepositoryPermission(repository).permission;
      if (permission.exceeds(AccessPermission.NONE)) {
        if (permission.atLeast(AccessPermission.PUSH) && !acceptPush(Transport.SSH)) {
          // downgrade the repo permission for this transport
          // because it is not an acceptable PUSH transport
          permission = AccessPermission.CLONE;
        }
View Full Code Here

Examples of com.gitblit.Constants.AccessPermission.exceeds()

    // git daemon url
    String gitDaemonUrl = servicesManager.getGitDaemonUrl(request, user, repository);
    if (!StringUtils.isEmpty(gitDaemonUrl)) {
      AccessPermission permission = servicesManager.getGitDaemonAccessPermission(user, repository);
      if (permission.exceeds(AccessPermission.NONE)) {
        if (permission.atLeast(AccessPermission.PUSH) && !acceptPush(Transport.GIT)) {
          // downgrade the repo permission for this transport
          // because it is not an acceptable PUSH transport
          permission = AccessPermission.CLONE;
        }
View Full Code Here

Examples of com.gitblit.Constants.AccessPermission.exceeds()

        } catch (RuntimeException e) {
          throw new UnloggedFailure("The data read from SDTIN can not be parsed as an SSH public key!");
        }
        if (!StringUtils.isEmpty(permission)) {
          AccessPermission ap = AccessPermission.fromCode(permission);
          if (ap.exceeds(AccessPermission.NONE)) {
            try {
              sshKey.setPermission(ap);
            } catch (IllegalArgumentException e) {
              throw new Failure(1, e.getMessage());
            }
View Full Code Here

Examples of com.gitblit.Constants.AccessPermission.exceeds()

        throw new UnloggedFailure(1"Invalid key index!");
      }

      SshKey key = keys.get(index - 1);
      AccessPermission permission = AccessPermission.fromCode(value);
      if (permission.exceeds(AccessPermission.NONE)) {
        try {
          key.setPermission(permission);
        } catch (IllegalArgumentException e) {
          throw new Failure(1, e.getMessage());
        }
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.