Fix Docker Auth and our V2 registry paths to support library (i.e. namespace-less) repositories.
This support is placed behind a feature flag.
This commit is contained in:
parent
06b0f756bd
commit
e4ffaff869
37 changed files with 270 additions and 148 deletions
|
@ -25,14 +25,14 @@ from buildtrigger.triggerutil import TriggerProviderException
|
|||
from data import model
|
||||
from data.database import db
|
||||
from endpoints.api.discovery import swagger_route_data
|
||||
from endpoints.common import common_login, render_page_template, route_show_if, param_required
|
||||
from endpoints.common import (common_login, render_page_template, route_show_if, param_required,
|
||||
parse_repository_name, parse_repository_name_and_tag)
|
||||
from endpoints.csrf import csrf_protect, generate_csrf_token, verify_csrf
|
||||
from endpoints.decorators import anon_protect, anon_allowed
|
||||
from health.healthcheck import get_healthchecker
|
||||
from util.cache import no_cache, cache_control
|
||||
from util.headers import parse_basic_auth
|
||||
from util.invoice import renderInvoiceToPdf
|
||||
from util.names import parse_repository_name, parse_repository_name_and_tag
|
||||
from util.seo import render_snapshot
|
||||
from util.systemlogs import build_logs_archive
|
||||
from util.useremails import send_email_changed
|
||||
|
@ -409,7 +409,7 @@ def confirm_recovery():
|
|||
abort(403)
|
||||
|
||||
|
||||
@web.route('/repository/<path:repository>/status', methods=['GET'])
|
||||
@web.route('/repository/<repopath:repository>/status', methods=['GET'])
|
||||
@parse_repository_name
|
||||
@anon_protect
|
||||
def build_status_badge(namespace, repository):
|
||||
|
@ -597,7 +597,7 @@ def download_logs_archive():
|
|||
abort(403)
|
||||
|
||||
|
||||
@web.route('/bitbucket/setup/<path:repository>', methods=['GET'])
|
||||
@web.route('/bitbucket/setup/<repopath:repository>', methods=['GET'])
|
||||
@require_session_login
|
||||
@parse_repository_name
|
||||
@route_show_if(features.BITBUCKET_BUILD)
|
||||
|
@ -630,7 +630,7 @@ def attach_bitbucket_trigger(namespace, repository_name):
|
|||
abort(403)
|
||||
|
||||
|
||||
@web.route('/customtrigger/setup/<path:repository>', methods=['GET'])
|
||||
@web.route('/customtrigger/setup/<repopath:repository>', methods=['GET'])
|
||||
@require_session_login
|
||||
@parse_repository_name
|
||||
def attach_custom_build_trigger(namespace, repository_name):
|
||||
|
@ -653,7 +653,7 @@ def attach_custom_build_trigger(namespace, repository_name):
|
|||
|
||||
abort(403)
|
||||
|
||||
@web.route('/<path:repository>')
|
||||
@web.route('/<repopath:repository>')
|
||||
@no_cache
|
||||
@process_oauth
|
||||
@parse_repository_name_and_tag
|
||||
|
|
Reference in a new issue