public void decide( Repository repository, ResourceStoreRequest request, Action action ) throws AccessDeniedException { //only bother checking item authorizer if there is no flag in request stating authorization //has been taken care of if ( !request.getRequestContext().containsKey( AccessManager.REQUEST_AUTHORIZED ) && !nexusItemAuthorizer.authorizePath( repository, request, action ) ) { // deny the access throw new AccessDeniedException( "Access denied on repository ID='" + repository.getId() + "', path='" + request.getRequestPath() + "', action='" + action + "'!" ); } } }
return this.nexusItemAuthorizer.authorizePath(mr, req, Action.read);
private boolean filterEvent(NexusArtifactEvent event) { try { Repository repo = this.repositoryRegistry.getRepository(event.getNexusItemInfo().getRepositoryId()); ResourceStoreRequest req = new ResourceStoreRequest(event.getNexusItemInfo().getPath()); if (!this.nexusItemAuthorizer.authorizePath(repo, req, Action.read)) { return false; } } catch (NoSuchRepositoryException e) { // Can't get repository for artifact, therefore we can't authorize access, therefore you don't see it log.debug( "Feed entry contained invalid repository id " + event.getNexusItemInfo().getRepositoryId(), e); return false; } return true; }
return this.nexusItemAuthorizer.authorizePath( mr, req, Action.read );
return this.itemAuthorizer.authorizePath( matched, action );