Add a feature flag for disabling unauthenticated access to the registry in its entirety.
This commit is contained in:
parent
598fc6ec46
commit
54992c23b7
15 changed files with 147 additions and 25 deletions
|
@ -20,6 +20,7 @@ from auth.permissions import (ModifyRepositoryPermission, UserAdminPermission,
|
|||
from util.http import abort
|
||||
from endpoints.trackhelper import track_and_log
|
||||
from endpoints.notificationhelper import spawn_notification
|
||||
from endpoints.decorators import anon_protect
|
||||
|
||||
import features
|
||||
|
||||
|
@ -278,6 +279,7 @@ def update_images(namespace, repository):
|
|||
@process_auth
|
||||
@parse_repository_name
|
||||
@generate_headers(scope=GrantType.READ_REPOSITORY)
|
||||
@anon_protect
|
||||
def get_repository_images(namespace, repository):
|
||||
permission = ReadRepositoryPermission(namespace, repository)
|
||||
|
||||
|
@ -315,6 +317,7 @@ def put_repository_auth(namespace, repository):
|
|||
|
||||
@index.route('/search', methods=['GET'])
|
||||
@process_auth
|
||||
@anon_protect
|
||||
def get_search():
|
||||
def result_view(repo):
|
||||
return {
|
||||
|
|
Reference in a new issue