Package org.sonatype.nexus.proxy.targets

Examples of org.sonatype.nexus.proxy.targets.TargetSet


    this.repoRegistry = repoRegistry;
  }

  public boolean authorizePath(final Repository repository, final ResourceStoreRequest request, final Action action) {
    // check repo only first, if there is directly assigned matching target permission, we're good
    final TargetSet matched = repository.getTargetsForRequest(request);
    if (matched != null && authorizePath(matched, action)) {
      return true;
    }
    // if we are here, we need to check cascading permissions, where this repository is contained in group
    return authorizePathCascade(repository, request, action);
View Full Code Here


  }

  // ===

  public TargetSet getGroupsTargetSet(final Repository repository, final ResourceStoreRequest request) {
    final TargetSet targetSet = new TargetSet();
    for (Repository group : getListOfGroups(repository.getId())) {
      // are the perms transitively inherited from the groups where it is member?
      // !group.isExposed()
      if (true) {
        final TargetSet groupMatched = group.getTargetsForRequest(request);
        targetSet.addTargetSet(groupMatched);
        // now that we have groups of groups, this needs to be a recursive check
        targetSet.addTargetSet(getGroupsTargetSet(group, request));
      }
    }
View Full Code Here

          + "' does not points to any repository!");
    }
  }

  public TargetSet getTargetsForRequest(ResourceStoreRequest request) {
    TargetSet result = new TargetSet();

    try {
      RequestRoute route = getRequestRouteForRequest(request);

      if (route.isRepositoryHit()) {
        // it hits a repository, mangle path and call it
        request.pushRequestPath(route.getRepositoryPath());
        try {
          result.addTargetSet(route.getTargetedRepository().getTargetsForRequest(request));
        }
        finally {
          request.popRequestPath();
        }
      }
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.proxy.targets.TargetSet

Copyright © 2018 www.massapicom. 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.