Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
annawinkler committed May 5, 2022
1 parent e4eaac6 commit 40a3165
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions registry_provider.go
Expand Up @@ -67,7 +67,6 @@ type RegistryProvider struct {
Links map[string]interface{} `jsonapi:"links,omitempty"`
}

// TODO - verify the permissions and which are required
type RegistryProviderPermissions struct {
CanDelete bool `jsonapi:"attr,can-delete,omitempty"`
CanUploadAsset bool `jsonapi:"attr,can-upload-asset,omitempty"`
Expand Down Expand Up @@ -154,7 +153,7 @@ func (r *registryProviders) Create(ctx context.Context, organization string, opt
return nil, err
}

// Private providers must match their namespace and organization name
// For private providers, the organization name and namespace must be the same.
// This is enforced by the API as well
if options.RegistryName == PrivateRegistry && organization != options.Namespace {
return nil, ErrInvalidPrivateProviderNamespaceDoesntMatchOrganization
Expand Down
2 changes: 2 additions & 0 deletions registry_provider_integration_test.go
Expand Up @@ -24,10 +24,12 @@ func TestRegistryProvidersList(t *testing.T) {
providers := make([]*RegistryProvider, 0)
// these providers will be destroyed when the org is cleaned up
for i := 0; i < createN; i++ {
// Create public providers
providerTest, _ := createPublicRegistryProvider(t, client, orgTest)
providers = append(providers, providerTest)
}
for i := 0; i < createN; i++ {
// Create private providers
providerTest, _ := createPrivateRegistryProvider(t, client, orgTest)
providers = append(providers, providerTest)
}
Expand Down

0 comments on commit 40a3165

Please sign in to comment.