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:
Joseph Schorr 2016-01-21 15:40:51 -05:00
parent 06b0f756bd
commit e4ffaff869
37 changed files with 270 additions and 148 deletions

View file

@ -38,7 +38,7 @@ def wrap_role_view_team(role_json, team):
return role_json
@resource('/v1/repository/<repopath:repository>/permissions/team/')
@resource('/v1/repository/<apirepopath:repository>/permissions/team/')
@path_param('repository', 'The full path of the repository. e.g. namespace/name')
class RepositoryTeamPermissionList(RepositoryParamResource):
""" Resource for repository team permissions. """
@ -57,7 +57,7 @@ class RepositoryTeamPermissionList(RepositoryParamResource):
}
@resource('/v1/repository/<repopath:repository>/permissions/user/')
@resource('/v1/repository/<apirepopath:repository>/permissions/user/')
@path_param('repository', 'The full path of the repository. e.g. namespace/name')
class RepositoryUserPermissionList(RepositoryParamResource):
""" Resource for repository user permissions. """
@ -97,7 +97,7 @@ class RepositoryUserPermissionList(RepositoryParamResource):
}
@resource('/v1/repository/<repopath:repository>/permissions/user/<username>/transitive')
@resource('/v1/repository/<apirepopath:repository>/permissions/user/<username>/transitive')
@path_param('repository', 'The full path of the repository. e.g. namespace/name')
@path_param('username', 'The username of the user to which the permissions apply')
class RepositoryUserTransitivePermission(RepositoryParamResource):
@ -121,7 +121,7 @@ class RepositoryUserTransitivePermission(RepositoryParamResource):
}
@resource('/v1/repository/<repopath:repository>/permissions/user/<username>')
@resource('/v1/repository/<apirepopath:repository>/permissions/user/<username>')
@path_param('repository', 'The full path of the repository. e.g. namespace/name')
@path_param('username', 'The username of the user to which the permission applies')
class RepositoryUserPermission(RepositoryParamResource):
@ -215,7 +215,7 @@ class RepositoryUserPermission(RepositoryParamResource):
return 'Deleted', 204
@resource('/v1/repository/<repopath:repository>/permissions/team/<teamname>')
@resource('/v1/repository/<apirepopath:repository>/permissions/team/<teamname>')
@path_param('repository', 'The full path of the repository. e.g. namespace/name')
@path_param('teamname', 'The name of the team to which the permission applies')
class RepositoryTeamPermission(RepositoryParamResource):