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
|
@ -15,6 +15,7 @@ from endpoints.api import (ApiResource, nickname, resource, validate_json_reques
|
|||
RepositoryParamResource)
|
||||
from endpoints.api.subscribe import subscribe
|
||||
from endpoints.common import common_login
|
||||
from endpoints.decorators import anon_allowed
|
||||
from endpoints.api.team import try_accept_invite
|
||||
|
||||
from data import model
|
||||
|
@ -203,6 +204,7 @@ class User(ApiResource):
|
|||
@require_scope(scopes.READ_USER)
|
||||
@nickname('getLoggedInUser')
|
||||
@define_json_response('UserView')
|
||||
@anon_allowed
|
||||
def get(self):
|
||||
""" Get user information for the authenticated user. """
|
||||
user = get_authenticated_user()
|
||||
|
@ -498,6 +500,7 @@ class Signin(ApiResource):
|
|||
|
||||
@nickname('signinUser')
|
||||
@validate_json_request('SigninUser')
|
||||
@anon_allowed
|
||||
def post(self):
|
||||
""" Sign in the user with the specified credentials. """
|
||||
signin_data = request.get_json()
|
||||
|
|
Reference in a new issue