initial import for Open Source 🎉
This commit is contained in:
parent
1898c361f3
commit
9c0dd3b722
2048 changed files with 218743 additions and 0 deletions
18
endpoints/api/signing_models_pre_oci.py
Normal file
18
endpoints/api/signing_models_pre_oci.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
from data import model
|
||||
from endpoints.api.signing_models_interface import SigningInterface
|
||||
|
||||
|
||||
class PreOCIModel(SigningInterface):
|
||||
"""
|
||||
PreOCIModel implements the data model for signing using a database schema
|
||||
before it was changed to support the OCI specification.
|
||||
"""
|
||||
def is_trust_enabled(self, namespace_name, repo_name):
|
||||
repo = model.repository.get_repository(namespace_name, repo_name)
|
||||
if repo is None:
|
||||
return False
|
||||
|
||||
return repo.trust_enabled
|
||||
|
||||
|
||||
pre_oci_model = PreOCIModel()
|
||||
Reference in a new issue