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
|
@ -141,6 +141,10 @@ class PreOCIModel(VerbsDataInterface):
|
|||
v1_metadata=_docker_v1_metadata(namespace_name, repo_name, found),
|
||||
internal_db_id=found.id,)
|
||||
|
||||
def is_namespace_enabled(self, namespace_name):
|
||||
namespace = model.user.get_namespace_user(namespace_name)
|
||||
return namespace is not None and namespace.enabled
|
||||
|
||||
|
||||
pre_oci_model = PreOCIModel()
|
||||
|
||||
|
|
Reference in a new issue