Provide more context when a "Domain has already been taken" when using Custom Domains
Release notes
Previously, when trying to use Custom Domains with GitLab Pages, an error would be presented if the domain has already been added to another project. The error message would not indicate the location of the project, causing additional work for a user to locate the project. Now, if the user has sufficient permission to access that other project, the error message will provide a link to the other project, allowing them to remove the Custom Domain. Projects that the user does not have access to will not be shown.
Problem to solve
As raised by a customer, there is some frustration for users when trying to use Custom Domains if the domain has already been registered in another project. This can happen more frequently in larger organisations when different teams work in silos on similar goals, with both possibly trying to use the same custom domain. Users are not informed of the location of the 'other project' where the custom domain was already added, resulting in tedious searching for the setting in every configured project the organisation has access to.
Proposal
Expand the current error message Domain has already been taken
to include an additional sentence if the user has sufficient permissions to view/manage the 'other project' where the domain has been configured as a custom domain. In all other situations, don't provide the project path.
Additionally, consider linking to the docs where it is indicated that unverified domains will be removed after 7 days.