Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/e2e/app_management_ns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1179,7 +1179,7 @@ func TestNamespacedPermissions(t *testing.T) {
Create()

sourceError := fmt.Sprintf("application repo %s is not permitted in project 'argo-project'", RepoURL(RepoURLTypeFile))
destinationError := fmt.Sprintf("application destination {%s %s} is not permitted in project 'argo-project'", KubernetesInternalAPIServerAddr, DeploymentNamespace())
destinationError := fmt.Sprintf("application destination server '%s' and namespace '%s' do not match any of the allowed destinations in project 'argo-project'", KubernetesInternalAPIServerAddr, DeploymentNamespace())

appCtx.
Path("guestbook-logs").
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/app_management_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1472,7 +1472,7 @@ func TestPermissions(t *testing.T) {
Create()

sourceError := fmt.Sprintf("application repo %s is not permitted in project 'argo-project'", RepoURL(RepoURLTypeFile))
destinationError := fmt.Sprintf("application destination {%s %s} is not permitted in project 'argo-project'", KubernetesInternalAPIServerAddr, DeploymentNamespace())
destinationError := fmt.Sprintf("application destination server '%s' and namespace '%s' do not match any of the allowed destinations in project 'argo-project'", KubernetesInternalAPIServerAddr, DeploymentNamespace())

appCtx.
Path("guestbook-logs").
Expand Down Expand Up @@ -1628,7 +1628,7 @@ func TestPermissionDeniedWithNegatedNamespace(t *testing.T) {
IgnoreErrors().
CreateApp().
Then().
Expect(Error("", "is not permitted in project"))
Expect(Error("", "do not match any of the allowed destinations in project"))
}

func TestPermissionDeniedWithNegatedServer(t *testing.T) {
Expand All @@ -1655,7 +1655,7 @@ func TestPermissionDeniedWithNegatedServer(t *testing.T) {
IgnoreErrors().
CreateApp().
Then().
Expect(Error("", "is not permitted in project"))
Expect(Error("", "do not match any of the allowed destinations in project"))
}

// make sure that if we deleted a resource from the app, it is not pruned if annotated with Prune=false
Expand Down
2 changes: 1 addition & 1 deletion util/argo/argo.go
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ func ValidatePermissions(ctx context.Context, spec *argoappv1.ApplicationSpec, p
if !permitted {
conditions = append(conditions, argoappv1.ApplicationCondition{
Type: argoappv1.ApplicationConditionInvalidSpecError,
Message: fmt.Sprintf("application destination {%s %s} is not permitted in project '%s'", spec.Destination.Server, spec.Destination.Namespace, spec.Project),
Message: fmt.Sprintf("application destination server '%s' and namespace '%s' do not match any of the allowed destinations in project '%s'", spec.Destination.Server, spec.Destination.Namespace, spec.Project),
})
}
// Ensure the k8s cluster the app is referencing, is configured in Argo CD
Expand Down