Notify admins when visiting the GitLab application from a URL that doesn't match the domain specified in the GitLab instance configuration
MR: Notify admin on Web IDE OAuth callback mismatch (gitlab!155138 - merged)
Description
As an admin, I am informed if I visit the GitLab application from a URL that doesn't match the domain specified in the GitLab instance configuration. This configuration mismatch is a potential source of Web IDE OAuth authorization issues for applications in the GitLab instance.
Context:
See #287 (closed) for full context.
When the Web IDE is loaded for the first time for the instance with the web_ide_oauth
flag enabled, an OAuth instance wide application is created at the code level based on the URL from the GitLab instance configuration. There could be mismatches between this domain and the one users are accessing the GitLab application from– when using a reverse proxy for example.
In #287 (closed)+, users are notified when they visit the GitLab Web IDE from GitLab instance URL whose domain is different from the domain in the OAuth callback URL which involves notifying their administrators to update the configuration.
Acceptance Criteria
-
Inform admins in the admin view if they are visiting the GItLab application from a URL that doesn't match the domain specified in the GitLab instance configuration.
Technical Requirements
-
You can access the GitLab instance configured domain using the gon.gitlab_url
variable. -
Here's an existing example of an alert banner within the admin view.
Design Requirements
- #287[Instance_admin_b.png]
- Note: it is acceptable if the alert reappears after the admin dismisses it but does not update the OAuth config.