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
|
@ -22,7 +22,7 @@ from formats.squashed import SquashedDockerImage
|
|||
from formats.aci import ACIImage
|
||||
from storage import Storage
|
||||
from endpoints.v2.blob import BLOB_DIGEST_ROUTE
|
||||
from endpoints.common import route_show_if
|
||||
from endpoints.common import route_show_if, parse_repository_name
|
||||
|
||||
|
||||
verbs = Blueprint('verbs', __name__)
|
||||
|
@ -376,6 +376,7 @@ def get_squashed_tag(namespace, repository, tag):
|
|||
@anon_protect
|
||||
@verbs.route('/torrent{0}'.format(BLOB_DIGEST_ROUTE), methods=['GET'])
|
||||
@process_auth
|
||||
@parse_repository_name
|
||||
def get_tag_torrent(namespace, repo_name, digest):
|
||||
permission = ReadRepositoryPermission(namespace, repo_name)
|
||||
public_repo = model.repository.repository_is_public(namespace, repo_name)
|
||||
|
|
Reference in a new issue