Skip to content

Allow user to add cluster when there are ancestor clusters

Mayra Cabrera requested to merge 34758-extend-can-create-cluster-logic into master

What does this MR do?

This MR was created as a consequence of https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/22996#note_122272045

If a user visits the project's kubernetes cluster index in CE, the "Add Kubernetes Cluster" button is disabled if any of that project's ancestor groups have a cluster. This button should only be disabled if there's a cluster defined specifically for that project.

This MR extends the definition of ClusterablePresenter#can_create_cluster? to also check if the project or group has a cluster.

Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/34758

EE counterpart https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/8706

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ce/issues/34758

Does this MR meet the acceptance criteria?

Edited by 🤖 GitLab Bot 🤖

Merge request reports

Loading