Commit fc10ff8
committed
fix(sso): gate SSO UI on plugin presence, not managed-cloud
The SSO controller is built with forceFallback: !SSO_ENABLED || SSO_FORCE_FALLBACK,
so ssoController.isUsingPlugin() is true only when SSO_ENABLED is on AND a real
plugin is loaded — it already encodes 'env var on + plugin available'. The UI
gates were leading on isManagedCloud instead, which is neither necessary nor
the intended signal (per review).
- login button: drop the isManagedCloud host check; gate on isUsingPlugin() AND
the hasSso global flag. hasSso is a DB-backed runtime kill switch for the SSO
login button (toggleable without a redeploy), so it's kept. isUsingPlugin() is
cheap and short-circuits before the flag fetch, so self-hosted/no-plugin pays
nothing.
- SSO settings page: drop isManagedCloud from both the loader and action gates;
key both on isUsingPlugin() so config mutations require an active plugin too.
- settings sidebar: drop isManagedCloud from the SSO menu item so it's gated on
isSsoUsingPlugin() alone, matching the loader/action and keeping the page
discoverable via normal navigation on self-hosted.
Addresses PR #3911 review.1 parent 5052d89 commit fc10ff8
3 files changed
Lines changed: 12 additions & 20 deletions
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
| 150 | + | |
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| |||
Lines changed: 4 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
| |||
79 | 78 | | |
80 | 79 | | |
81 | 80 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
| 81 | + | |
| 82 | + | |
88 | 83 | | |
89 | 84 | | |
90 | 85 | | |
| |||
175 | 170 | | |
176 | 171 | | |
177 | 172 | | |
178 | | - | |
179 | | - | |
| 173 | + | |
| 174 | + | |
180 | 175 | | |
181 | 176 | | |
182 | 177 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
| |||
86 | 85 | | |
87 | 86 | | |
88 | 87 | | |
89 | | - | |
90 | | - | |
91 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
92 | 92 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
99 | 96 | | |
100 | 97 | | |
101 | 98 | | |
| |||
0 commit comments