Re-enable builds and tag modification when signing is enabled
This commit is contained in:
parent
ba713b624d
commit
2e30c47045
7 changed files with 3 additions and 90 deletions
|
@ -387,23 +387,6 @@ def define_json_response(schema_name):
|
|||
return wrapper
|
||||
|
||||
|
||||
def disallow_under_trust(func):
|
||||
""" Disallows the decorated operation for repository when it has trust enabled.
|
||||
"""
|
||||
@wraps(func)
|
||||
def wrapper(self, *args, **kwargs):
|
||||
if features.SIGNING:
|
||||
namespace = args[0]
|
||||
repository = args[1]
|
||||
|
||||
repo = model.repository.get_repository(namespace, repository)
|
||||
if repo is not None and repo.trust_enabled:
|
||||
raise InvalidRequest('Cannot call this method on a repostory with trust enabled')
|
||||
|
||||
return func(self, *args, **kwargs)
|
||||
return wrapper
|
||||
|
||||
|
||||
import endpoints.api.billing
|
||||
import endpoints.api.build
|
||||
import endpoints.api.discovery
|
||||
|
|
Reference in a new issue