File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -132,14 +132,18 @@ Returns:
132132*/
133133func (impl DockerRegistryConfigImpl ) ValidateRegistryStorageType (registryId string , storageType string , storageActions ... string ) bool {
134134 isValid := false
135- ociRegistryConfigList , err := impl .ociRegistryConfigRepository . FindByDockerRegistryId (registryId )
135+ store , err := impl .dockerArtifactStoreRepository . FindOne (registryId )
136136 if err != nil {
137137 return false
138138 }
139- for _ , ociRegistryConfig := range ociRegistryConfigList {
140- if ociRegistryConfig .RepositoryType == storageType && slices .Contains (storageActions , ociRegistryConfig .RepositoryAction ) {
141- isValid = true
139+ if store .IsOCICompliantRegistry {
140+ for _ , ociRegistryConfig := range store .OCIRegistryConfig {
141+ if ociRegistryConfig .RepositoryType == storageType && slices .Contains (storageActions , ociRegistryConfig .RepositoryAction ) {
142+ isValid = true
143+ }
142144 }
145+ } else {
146+ return true
143147 }
144148 return isValid
145149}
You can’t perform that action at this time.
0 commit comments