You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Defines the "Hide Slogan" feature that removes the Nextcloud slogan/payoff text from the login page. Dutch government organizations typically need to present a clean, branded login page without Nextcloud's default slogan ("a safe home for all your data"). When enabled, the footer element on the login page that contains this slogan is completely hidden.
10
+
Defines the "Hide Slogan" feature that removes the Nextcloud slogan/payoff text from the login page. Dutch government organizations typically need to present a clean, branded login page without Nextcloud's default slogan ("a safe home for all your data"). When enabled, the footer element on the login page that contains this slogan is completely hidden via a conditionally loaded CSS file.
10
11
11
12
## Requirements
12
13
13
14
### REQ-SLGN-001: Configuration Storage
14
-
The hide slogan setting MUST be stored in Nextcloud's `IConfig` as a string value.
15
+
The hide slogan setting MUST be stored in Nextcloud's `IConfig` as a string value with clear on/off semantics.
15
16
16
17
#### Scenario: Setting stored as enabled
17
18
- GIVEN the admin enables the hide slogan feature
@@ -31,45 +32,61 @@ The hide slogan setting MUST be stored in Nextcloud's `IConfig` as a string valu
31
32
- THEN the default value MUST be `'0'` (disabled)
32
33
- AND the slogan MUST be visible on the login page
33
34
35
+
#### Scenario: Setting persists across app restarts
36
+
- GIVEN the admin has enabled the hide slogan setting
37
+
- WHEN the Nextcloud server is restarted
38
+
- THEN the setting MUST still be `'1'` in IConfig
39
+
- AND the slogan MUST remain hidden on the login page
40
+
34
41
### REQ-SLGN-002: Conditional CSS Loading
35
-
The hide-slogan CSS file MUST only be loaded when the feature is enabled.
42
+
The hide-slogan CSS file MUST only be loaded when the feature is enabled, minimizing unnecessary CSS injection.
36
43
37
44
#### Scenario: Feature enabled loads CSS
38
45
- GIVEN `IConfig` returns `'1'` for `hide_slogan`
39
46
- WHEN `Application::injectThemeCSS()` runs during boot
40
47
- THEN `\OCP\Util::addStyle('nldesign', 'hide-slogan')` MUST be called
41
-
- AND the CSS file MUST be loaded after the 7 core CSS layers
48
+
- AND the CSS file MUST be loaded after all core CSS layers and the custom-overrides layer
42
49
43
50
#### Scenario: Feature disabled skips CSS
44
51
- GIVEN `IConfig` returns `'0'` for `hide_slogan`
45
52
- WHEN `Application::injectThemeCSS()` runs during boot
46
53
- THEN `hide-slogan` CSS MUST NOT be loaded
54
+
- AND no slogan-hiding styles MUST be injected into the page
55
+
56
+
#### Scenario: CSS loading position in cascade
57
+
- GIVEN the hide-slogan CSS is loaded
58
+
- WHEN the CSS cascade is evaluated
59
+
- THEN hide-slogan MUST load after Layer 7 (element-overrides) and custom-overrides
60
+
- AND before any user-agent default styles could interfere
61
+
- AND the `!important` declarations MUST ensure the hiding takes effect regardless of other styles
47
62
48
63
### REQ-SLGN-003: Slogan Element Hiding
49
-
When the feature is enabled, the login page footer containing the slogan MUST be completely hidden.
64
+
When the feature is enabled, the login page footer containing the slogan MUST be completely hidden from both visual display and the accessibility tree.
50
65
51
66
#### Scenario: Footer element hidden with display none
52
67
- GIVEN the hide-slogan CSS is loaded
53
68
- WHEN the login page renders
54
69
- THEN `footer.guest-box` MUST have `display: none !important`
55
70
- AND `visibility: hidden !important`
56
71
57
-
#### Scenario: Multiple selector coverage
72
+
#### Scenario: Multiple selector coverage for robustness
58
73
- GIVEN the hide-slogan CSS is loaded
59
74
- WHEN the login page renders
60
75
- THEN the CSS MUST target these selectors for maximum coverage:
- THEN no Nextcloud branding text MUST appear below the login form
209
+
- AND the login page MUST present only the government organization's branding
210
+
- AND the clean appearance MUST align with Rijkshuisstijl guidelines
211
+
212
+
#### Scenario: Municipality login page compliance
213
+
- GIVEN a gemeente token set (e.g., amsterdam) is active
214
+
- AND the hide slogan feature is enabled
215
+
- WHEN the login page renders
216
+
- THEN the municipality's visual identity MUST be the sole branding on the page
217
+
- AND the Nextcloud slogan MUST NOT distract from the government branding
218
+
219
+
#### Scenario: Feature works with all token sets
220
+
- GIVEN any token set is active (including stock Nextcloud)
221
+
- WHEN the hide slogan feature is enabled
222
+
- THEN the slogan MUST be hidden regardless of which token set is selected
223
+
- AND the feature MUST function independently of the token set choice
224
+
225
+
### REQ-SLGN-010: Effect Requires Page Reload
226
+
The hide slogan setting takes effect at boot time (CSS injection), so changes MUST take effect on the next page load.
227
+
228
+
#### Scenario: Setting change not immediate
229
+
- GIVEN the admin enables hide slogan in the settings panel
230
+
- WHEN the API call succeeds
231
+
- THEN the current page MUST NOT immediately hide the slogan on the login page
232
+
- AND the CSS MUST be injected on the next full page load via `Application::boot()`
233
+
234
+
#### Scenario: Admin sees effect by navigating to login page
235
+
- GIVEN the admin has enabled the hide slogan setting
236
+
- WHEN the admin opens the login page in a new tab or incognito window
237
+
- THEN the slogan MUST be hidden
238
+
- AND this confirms the setting is active
130
239
131
240
### Current Implementation Status
132
241
133
242
**Fully implemented:**
134
-
- Configuration storage: `Application.php` reads `hide_slogan` from `IConfig` with default `'0'`, compares with `=== '1'` (line 80)
135
-
- API endpoint: `POST /apps/nldesign/settings/slogan` mapped in `appinfo/routes.php` (line 10) to `SettingsController::setSloganSetting()` (`lib/Controller/SettingsController.php` lines 161-175)
136
-
- Boolean conversion: `setSloganSetting(bool $hideSlogan)` uses strict `=== true` to convert to `'1'`/`'0'` string (lines 163-166)
243
+
- Configuration storage: `Application.php` reads `hide_slogan` from `IConfig` with default `'0'`, compares with `=== '1'` (line 85)
244
+
- API endpoint: `POST /apps/nldesign/settings/slogan` mapped in `appinfo/routes.php` (line 14) to `SettingsController::setSloganSetting()`
245
+
- Boolean conversion: `saveBooleanSetting('hide_slogan', $hideSlogan)` uses strict `=== true` to convert to `'1'`/`'0'` string (`lib/Controller/SettingsController.php`lines 162-170)
137
246
- Conditional CSS loading: `Application::injectThemeCSS()` loads `hide-slogan` CSS only when `$hideSlogan === true` (lines 112-114)
138
-
- CSS file: `css/hide-slogan.css`(17 lines) targets `footer.guest-box`, `#body-login footer.guest-box`, and `body.body-login-container footer.guest-box` with both `display: none !important` and `visibility: hidden !important`
247
+
- CSS file: `css/hide-slogan.css` targets `footer.guest-box`, `#body-login footer.guest-box`, and `body.body-login-container footer.guest-box` with both `display: none !important` and `visibility: hidden !important`
139
248
- Admin-only access: `@AuthorizedAdminSetting(settings=OCA\NLDesign\Settings\Admin)` annotation on `setSloganSetting()`
140
-
- Settings panel checkbox: `templates/settings/admin.php` renders `#nldesign-hide-slogan` checkbox with correct checked state and label text
141
-
- JavaScript handler: `js/admin.js` calls `saveSloganSetting()` on checkbox change via `POST /apps/nldesign/settings/slogan`
249
+
- Settings panel checkbox: `templates/settings/admin.php` renders `#nldesign-hide-slogan` checkbox with correct checked state and localized label text
250
+
- JavaScript handler: `js/admin.js` calls save on checkbox change via `POST /apps/nldesign/settings/slogan`
142
251
143
252
**Not yet implemented:**
144
253
- All requirements in this spec are fully implemented.
145
254
146
255
### Standards & References
147
256
- Rijkshuisstijl guidelines: Dutch government login pages should present clean, branded appearance without third-party slogans
148
-
- WCAG AA: hiding decorative text does not affect accessibility; the `display: none`approach correctly removes elements from the accessibility tree
257
+
- WCAG 2.1 AA: hiding decorative text with `display: none` correctly removes elements from the accessibility tree (this is acceptable for non-functional slogan text)
149
258
- Nextcloud login page structure: `footer.guest-box` is the standard container for the slogan on guest/login pages
150
-
151
-
### Specificity Assessment
152
-
- This spec is highly specific and directly implementable. Every scenario maps 1:1 to the implementation.
153
-
- All CSS selectors, IConfig keys, API endpoints, boolean conversion logic, and conditional loading behavior are precisely defined.
154
-
- No ambiguities or open questions remain -- this spec is complete as-is.
259
+
- OWASP: admin-only endpoint protects against unauthorized setting changes
0 commit comments