Ensure that verbs cannot be performed on disabled namespaces or by disabled users
This commit is contained in:
parent
db7e5f7cfa
commit
892cc82b6a
4 changed files with 47 additions and 0 deletions
|
@ -204,6 +204,10 @@ def _verify_repo_verb(_, namespace, repo_name, tag, verb, checker=None):
|
|||
get_authenticated_user())
|
||||
abort(405)
|
||||
|
||||
# Make sure the repo's namespace isn't disabled.
|
||||
if not model.is_namespace_enabled(namespace):
|
||||
abort(400)
|
||||
|
||||
# If there is a data checker, call it first.
|
||||
if checker is not None:
|
||||
if not checker(tag_image):
|
||||
|
|
Reference in a new issue