Skip to content

Conversation

@ThomasSarlin
Copy link
Contributor

@ThomasSarlin ThomasSarlin commented Dec 19, 2025

WHAT is this pull request doing?

Close #1287

A different approach which adds a helper that disables the vhost selection for specific views.

The initial thought was as follows:

we add a variable to all views which should not allow vhost switch, naming up for discussion:

window.vhostLocked = true

We disable the vhost selector if that variable is set and add a hover tooltip Current view is locked to vhost x or something similar?

#1566 (comment)

But as layout.js is loaded before the different view specific Javascript files, the approach with setting a value to window.vhostLocked falls short on execution. Another alternative is to call a function (Helper.disableUserMenuVhost) that disables the vhost-selector on view load in each specific view, presented in this PR.

HOW can this pull request be tested?

Try clicking the vhost-swap selector in a vhost-locked view, should not work ✅
Try clicking the vhost-swap selector in a non-vhost-locked view, should work ✅
image

@ThomasSarlin ThomasSarlin force-pushed the disable-vhost-selection-on-vhost-locked-views branch from 54e8f5d to caddc88 Compare December 19, 2025 13:51
@ThomasSarlin ThomasSarlin force-pushed the disable-vhost-selection-on-vhost-locked-views branch from edf3ac1 to 4ea4092 Compare December 19, 2025 14:25
@ThomasSarlin ThomasSarlin marked this pull request as ready for review January 19, 2026 11:39
@ThomasSarlin ThomasSarlin requested a review from a team as a code owner January 19, 2026 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broken change-vhost routing

2 participants