Skip to content

Commit 0ecedcb

Browse files
authored
feat(settings): the Access tab draws the board's Rollen en groepen and E-mailsjablonen (admin-settings-tabs 2.1) (#2390)
Assisted-by: ClaudeCode:claude-opus-5-5
1 parent 472e732 commit 0ecedcb

16 files changed

Lines changed: 505 additions & 71 deletions

File tree

‎l10n/en.json‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2597,6 +2597,19 @@
25972597
"{count} connection": "{count} connection",
25982598
"{count} connections": "{count} connections",
25992599
"{count} contract": "{count} contract",
2600-
"{count} contracts": "{count} contracts"
2600+
"{count} contracts": "{count} contracts",
2601+
"Roles and groups": "Roles and groups",
2602+
"User groups": "User groups",
2603+
"Which of your groups grant each catalogue role, and what the role may do.": "Which of your groups grant each catalogue role, and what the role may do.",
2604+
"The groups new users, organisation administrators and super users are put in.": "The groups new users, organisation administrators and super users are put in.",
2605+
"May": "May",
2606+
"Maintain the applications and services the organisation offers.": "Maintain the applications and services the organisation offers.",
2607+
"Maintain the organisation's application landscape: what it uses, its connections and contracts.": "Maintain the organisation's application landscape: what it uses, its connections and contracts.",
2608+
"Read the organisation's application landscape.": "Read the organisation's application landscape.",
2609+
"Review the organisation's access and follow its synchronisations.": "Review the organisation's access and follow its synchronisations.",
2610+
"Maintain the organisation and review who has access.": "Maintain the organisation and review who has access.",
2611+
"Read the catalogue for VNG.": "Read the catalogue for VNG.",
2612+
"Email templates": "Email templates",
2613+
"The mails for registration, activation, new accounts and password reset.": "The mails for registration, activation, new accounts and password reset."
26012614
}
26022615
}

‎l10n/nl.js‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2604,7 +2604,20 @@ OC.L10N.register(
26042604
"{count} connection": "{count} koppeling",
26052605
"{count} connections": "{count} koppelingen",
26062606
"{count} contract": "{count} contract",
2607-
"{count} contracts": "{count} contracten"
2607+
"{count} contracts": "{count} contracten",
2608+
"Roles and groups": "Rollen en groepen",
2609+
"User groups": "Gebruikersgroepen",
2610+
"Which of your groups grant each catalogue role, and what the role may do.": "Welke van uw groepen elke catalogusrol geven, en wat de rol mag.",
2611+
"The groups new users, organisation administrators and super users are put in.": "De groepen waarin nieuwe gebruikers, organisatiebeheerders en supergebruikers komen.",
2612+
"May": "Mag",
2613+
"Maintain the applications and services the organisation offers.": "De applicaties en diensten beheren die de organisatie aanbiedt.",
2614+
"Maintain the organisation's application landscape: what it uses, its connections and contracts.": "Het applicatielandschap van de organisatie beheren: wat zij gebruikt, haar koppelingen en contracten.",
2615+
"Read the organisation's application landscape.": "Het applicatielandschap van de organisatie inzien.",
2616+
"Review the organisation's access and follow its synchronisations.": "De toegang van de organisatie beoordelen en haar synchronisaties volgen.",
2617+
"Maintain the organisation and review who has access.": "De organisatie beheren en beoordelen wie toegang heeft.",
2618+
"Read the catalogue for VNG.": "De catalogus inzien voor VNG.",
2619+
"Email templates": "E-mailsjablonen",
2620+
"The mails for registration, activation, new accounts and password reset.": "De mails voor registratie, activering, nieuwe accounts en wachtwoordherstel."
26082621
},
26092622
"nplurals=2; plural=(n != 1);"
26102623
)

‎l10n/nl.json‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2660,6 +2660,19 @@
26602660
"{count} connection": "{count} koppeling",
26612661
"{count} connections": "{count} koppelingen",
26622662
"{count} contract": "{count} contract",
2663-
"{count} contracts": "{count} contracten"
2663+
"{count} contracts": "{count} contracten",
2664+
"Roles and groups": "Rollen en groepen",
2665+
"User groups": "Gebruikersgroepen",
2666+
"Which of your groups grant each catalogue role, and what the role may do.": "Welke van uw groepen elke catalogusrol geven, en wat de rol mag.",
2667+
"The groups new users, organisation administrators and super users are put in.": "De groepen waarin nieuwe gebruikers, organisatiebeheerders en supergebruikers komen.",
2668+
"May": "Mag",
2669+
"Maintain the applications and services the organisation offers.": "De applicaties en diensten beheren die de organisatie aanbiedt.",
2670+
"Maintain the organisation's application landscape: what it uses, its connections and contracts.": "Het applicatielandschap van de organisatie beheren: wat zij gebruikt, haar koppelingen en contracten.",
2671+
"Read the organisation's application landscape.": "Het applicatielandschap van de organisatie inzien.",
2672+
"Review the organisation's access and follow its synchronisations.": "De toegang van de organisatie beoordelen en haar synchronisaties volgen.",
2673+
"Maintain the organisation and review who has access.": "De organisatie beheren en beoordelen wie toegang heeft.",
2674+
"Read the catalogue for VNG.": "De catalogus inzien voor VNG.",
2675+
"Email templates": "E-mailsjablonen",
2676+
"The mails for registration, activation, new accounts and password reset.": "De mails voor registratie, activering, nieuwe accounts en wachtwoordherstel."
26642677
}
26652678
}

‎lib/Settings/connections.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"title": "Email",
77
"description": "Sends registration, activation and account mails to organisations and their users.",
88
"order": 10,
9-
"settingsUrl": "/settings/admin/stackiq#access",
9+
"settingsUrl": "/settings/admin/stackiq#general",
1010
"adapter": {
1111
"configKey": "email_transport_type",
1212
"simulatedValues": ["null"],

‎openspec/changes/admin-settings-tabs/specs/fe-settings-ui/spec.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
### Requirement: The admin page is one shell with tabs (REQ-FE-311)
44

5-
The admin page SHALL be one `CnAdminSettingsShell` with the board look and an underline tab strip General, Data, Exchange and Access (ids `general`, `data`, `exchange`, `access`). The open tab SHALL be in the address fragment, only the open tab SHALL be mounted, and the version card SHALL be on the first tab. Each tab SHALL hold the sections its board draws: Data the ArchiMate import and export, the end-of-life feed, organisation synchronisation and the CMDB import (board SkInstellingenGegevens); Exchange catalogue federation, the service desk exchange and the webhooks (board SkInstellingenUitwisseling); Access roles and groups, registration and review moderation and mail (board SkBeheerToegang); General the statistics, the general settings, the OpenRegister integration and the background jobs. A link into the page SHALL name the tab that holds its section.
5+
The admin page SHALL be one `CnAdminSettingsShell` with the board look and an underline tab strip General, Data, Exchange and Access (ids `general`, `data`, `exchange`, `access`). The open tab SHALL be in the address fragment, only the open tab SHALL be mounted, and the version card SHALL be on the first tab. Each tab SHALL hold the sections its board draws: Data the ArchiMate import and export, the end-of-life feed, organisation synchronisation and the CMDB import (board SkInstellingenGegevens); Exchange catalogue federation, the service desk exchange and the webhooks (board SkInstellingenUitwisseling); Access the roles and groups (each catalogue role, what it may do and the groups that grant it), registration and review moderation and the mail templates (board SkBeheerToegang); General the statistics, the general settings, the OpenRegister integration, the background jobs, the user group lists (generic, organisation admin and super user groups) and the mail transport (sending, types and testing). A link into the page SHALL name the tab that holds its section.
66

77
#### Scenario: A link opens the tab of its section
88
- GIVEN the service desk exchange sits on the Exchange tab

‎openspec/changes/admin-settings-tabs/tasks.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@
1414
- Pixel, Exchange tab, federation (30 Nov 2026, SkInstellingenUitwisseling): the subscribed peers are a table (Catalogue, Address, Last pulled, Objects, Actions); stale/blocked badges, last error and the failure streak stay in their cells. Add peer and Pull now sit under the table, Add peer opens the add field (open by itself while no peer is subscribed), and the board's Herkomst line shows the first peer's name. Each peer has the board's action menu; Remove peer asks first in the board's confirmation (Peer, Gevolg). The registration is the board's Aangekondigd line next to Herkomst, the switch stays above it; the directory address joins that compact fact list (labels left, muted) and the card's sub-headings are at the card's text size (live screenshot 30 Nov 2026). The menu's Nu ophalen pulls that peer alone (`POST /api/federation/peers/pull`, subscribed peers only). Still different: no Adres wijzigen (a changed address would leave the objects mirrored under the old address behind); the confirmation says fetched objects stay, because removing a peer deletes nothing (the board's 'De N opgehaalde objecten verdwijnen' waits for Ruben, COORDINATOR-QUEUE 30 Nov).
1515
- Pixel pass, live screenshots (30 Nov 2026, sandbox NC 34, 1440 px) against the three boards. Exchange: the federation card follows SkInstellingenUitwisseling (#2373, #2376, #2377, #2379), and Integrations beside Service desk exchange, then Webhooks, are in the board's order. Data: the Organization Synchronization card's buttons ran past its half-width column; its rows wrap now. Still different from SkInstellingenGegevens: ArchiMate import/export is the old upload, export and check layout, not the board's one card with import progress and the round-trip line; the organisation sync card still shows its statistics grid and the voorzieningen sync. Access, against SkBeheerToegang: User Groups Configuration with four sub-tabs instead of the board's Rollen en groepen table (role, what it may do, group select); the e-mail configuration (SMTP, types, testing) instead of the board's E-mailsjablonen card; no Toegangsreview card (the quarterly access review has no spec or endpoint yet, so it is a new change, not this one).
1616
- Pixel, Data tab, ArchiMate (30 Nov 2026, SkInstellingenGegevens): the card is the board's 'ArchiMate importeren en exporteren' with its Open Group subtitle; the drop zone and separate Import step are gone: Bestand importeren opens the picker and the import starts on the pick, a running import names its file ('<file> wordt geïmporteerd') above its phase and Import annuleren; Bestand importeren and Basis exporteren share one action row, and the organisation select with Organisatie exporteren is one row under a rule (the include switches stay under it once an organisation is chosen). Still different: the board's round-trip line (last check's date and result, Verslag bekijken) needs a stored last check; the round-trip check stays the per-file check under the card.
17+
- Pixel, Access tab (30 Nov 2026, SkBeheerToegang, decision 30 Nov 07:41Z option a): the Access tab draws the board's Rollen en groepen (the role table with a May column saying what each role may do, the role group under the role's name, the multi-group select kept; no sub-tabs) and E-mailsjablonen (the template editor only). The generic, organisation admin and super user group lists and the mail transport (settings, types, testing) moved to General under their own cards; the integriq Email connection links to `#general`. Unit: `accessTabSplitSections.spec.js`, `adminSettingsTabs.spec.js`, `ConnectionsDeclarationTest`. Still open: the board amendment for the multi-group select and the General tab cards (design), the live pixel re-run, and Toegangsreview (a new change).
1718
- [ ] 2.2 Archive this change with its spec synced.

‎src/views/settings/StackiqSettings.vue‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@
9393
<!-- Background Jobs Configuration Section -->
9494
<CronjobConfiguration />
9595

96+
<!-- The group lists and the mail transport, moved off the Access tab
97+
(board SkBeheerToegang draws only Rollen en groepen and E-mailsjablonen). -->
98+
<UserGroupsConfiguration part="groups" class="cn-settings-section--wide" />
99+
100+
<EmailConfiguration part="transport" class="cn-settings-section--wide" />
101+
96102
<template #tab-data>
97103
<DataTab />
98104
</template>
@@ -118,8 +124,10 @@ import { defineComponent } from 'vue'
118124
import Web from 'vue-material-design-icons/Web.vue'
119125
import AlwaysVisibleSection from '../../components/AlwaysVisibleSection.vue'
120126
import CronjobConfiguration from './sections/CronjobConfiguration.vue'
127+
import EmailConfiguration from './sections/EmailConfiguration.vue'
121128
import OpenRegisterIntegration from './sections/OpenRegisterIntegration.vue'
122129
import StatisticsOverview from './sections/StatisticsOverview.vue'
130+
import UserGroupsConfiguration from './sections/UserGroupsConfiguration.vue'
123131
import AccessTab from './tabs/AccessTab.vue'
124132
import DataTab from './tabs/DataTab.vue'
125133
import ExchangeTab from './tabs/ExchangeTab.vue'
@@ -147,6 +155,8 @@ export default defineComponent({
147155
OpenRegisterIntegration,
148156
StatisticsOverview,
149157
CronjobConfiguration,
158+
EmailConfiguration,
159+
UserGroupsConfiguration,
150160
AlwaysVisibleSection,
151161
DataTab,
152162
ExchangeTab,
@@ -196,7 +206,7 @@ export default defineComponent({
196206
*/
197207
tabs() {
198208
return [
199-
{ id: 'general', label: t('stackiq', 'General'), count: 3 },
209+
{ id: 'general', label: t('stackiq', 'General'), count: 5 },
200210
{ id: 'data', label: t('stackiq', 'Data'), count: 6 },
201211
{ id: 'exchange', label: t('stackiq', 'Exchange'), count: 4 },
202212
{ id: 'access', label: t('stackiq', 'Access'), count: 4 },

‎src/views/settings/sections/EmailConfiguration.vue‎

Lines changed: 96 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222

2323
<template>
2424
<AlwaysVisibleSection
25-
id="section-email"
26-
name="Email Configuration"
27-
description="Configure email settings for notifications and user management"
25+
:id="part === 'templates' ? 'section-email-templates' : 'section-email'"
26+
:name="sectionName"
27+
:description="sectionDescription"
2828
:loading="loading"
29-
:showSaveButton="true"
29+
:showSaveButton="part !== 'templates'"
3030
:canSave="canSave"
3131
:saving="saving"
3232
saveButtonText="Save Email Settings"
@@ -37,20 +37,22 @@
3737
type="warning"
3838
data-testid="email-transport-warning">
3939
<p>{{ t('stackiq', 'No mail transport is set, so registration, activation and account mails are not sent.') }}</p>
40-
<NcButton variant="tertiary" @click="activeTab = 'settings'">
40+
<!-- On the Access tab (templates only) the transport lives on the General tab. -->
41+
<a v-if="part === 'templates'" href="#general" data-testid="email-transport-link">
42+
{{ t('stackiq', 'Set up the mail transport') }}
43+
</a>
44+
<NcButton v-else variant="tertiary" @click="activeTab = 'settings'">
4145
{{ t('stackiq', 'Set up the mail transport') }}
4246
</NcButton>
4347
</NcNoteCard>
44-
<StandardTabs
45-
:tabs="[
46-
{ key: 'settings', title: 'Settings' },
47-
{ key: 'email-types', title: 'Email Types' },
48-
{ key: 'testing', title: 'Testing' },
49-
{ key: 'templates', title: 'Templates' },
50-
]"
51-
:activeTab="activeTab"
48+
<!-- Board SkBeheerToegang: the Access tab draws only 'E-mailsjablonen'
49+
(part="templates", no sub-tabs); sending, types and testing sit on
50+
the General tab (part="transport"). part="all" keeps all four. -->
51+
<component
52+
:is="part === 'templates' ? 'div' : 'StandardTabs'"
53+
v-bind="part === 'templates' ? {} : { tabs: subTabs, activeTab }"
5254
@update:activeTab="activeTab = $event">
53-
<div v-show="activeTab === 'settings'" class="tab-panel">
55+
<div v-if="showsTransport" v-show="activeTab === 'settings'" class="tab-panel">
5456
<div class="email-settings-section">
5557
<h3>Email Settings</h3>
5658
<p>
@@ -224,7 +226,7 @@
224226
</div>
225227
</div>
226228

227-
<div v-show="activeTab === 'email-types'" class="tab-panel">
229+
<div v-if="showsTransport" v-show="activeTab === 'email-types'" class="tab-panel">
228230
<div class="email-types-section">
229231
<h3>Email Types</h3>
230232
<p>Configure which types of emails are automatically sent</p>
@@ -279,7 +281,7 @@
279281
</div>
280282
</div>
281283

282-
<div v-show="activeTab === 'testing'" class="tab-panel">
284+
<div v-if="showsTransport" v-show="activeTab === 'testing'" class="tab-panel">
283285
<div class="email-testing-section">
284286
<h3>Email Testing</h3>
285287
<p>
@@ -351,9 +353,15 @@
351353
</div>
352354
</div>
353355

354-
<div v-show="activeTab === 'templates'" class="tab-panel">
356+
<div
357+
v-if="showsTemplates"
358+
v-show="part === 'templates' || activeTab === 'templates'"
359+
class="tab-panel"
360+
data-testid="email-templates-panel">
355361
<div class="email-templates-section">
356-
<h3>Email Templates</h3>
362+
<h3 v-if="part !== 'templates'">
363+
Email Templates
364+
</h3>
357365
<p>
358366
Customize email templates for different types of
359367
notifications
@@ -443,7 +451,7 @@
443451
</div>
444452
</div>
445453
</div>
446-
</StandardTabs>
454+
</component>
447455

448456
<!-- Info Content Slot -->
449457
<template #info-content>
@@ -685,6 +693,19 @@ export default {
685693
StandardTabs,
686694
},
687695
696+
props: {
697+
/**
698+
* Which part of the section to draw: `templates` (the Access tab's
699+
* E-mailsjablonen, board SkBeheerToegang), `transport` (sending, types
700+
* and testing, General tab) or `all` (the four sub-tabs).
701+
*/
702+
part: {
703+
type: String,
704+
default: 'all',
705+
validator: (value) => ['all', 'transport', 'templates'].includes(value),
706+
},
707+
},
708+
688709
/**
689710
* @spec openspec/specs/fe-settings-ui/spec.md
690711
*/
@@ -697,6 +718,7 @@ export default {
697718
data() {
698719
return {
699720
...INITIAL_STATE,
721+
activeTab: this.part === 'templates' ? 'templates' : INITIAL_STATE.activeTab,
700722
availableTemplates: structuredClone(AVAILABLE_TEMPLATES),
701723
702724
templates: {},
@@ -736,6 +758,53 @@ export default {
736758
return true
737759
},
738760
761+
/**
762+
* @return {boolean} Whether this part draws sending, types and testing.
763+
* @spec openspec/changes/admin-settings-tabs/specs/fe-settings-ui/spec.md#requirement-the-admin-page-is-one-shell-with-tabs
764+
*/
765+
showsTransport() {
766+
return this.part !== 'templates'
767+
},
768+
769+
/**
770+
* @return {boolean} Whether this part draws the template editor.
771+
* @spec openspec/changes/admin-settings-tabs/specs/fe-settings-ui/spec.md#requirement-the-admin-page-is-one-shell-with-tabs
772+
*/
773+
showsTemplates() {
774+
return this.part !== 'transport'
775+
},
776+
777+
/**
778+
* @return {Array<{key: string, title: string}>} The sub-tabs of this part.
779+
* @spec openspec/changes/admin-settings-tabs/specs/fe-settings-ui/spec.md#requirement-the-admin-page-is-one-shell-with-tabs
780+
*/
781+
subTabs() {
782+
const tabs = [
783+
{ key: 'settings', title: 'Settings' },
784+
{ key: 'email-types', title: 'Email Types' },
785+
{ key: 'testing', title: 'Testing' },
786+
]
787+
return this.showsTemplates ? [...tabs, { key: 'templates', title: 'Templates' }] : tabs
788+
},
789+
790+
/**
791+
* @return {string} The card title: the board's E-mailsjablonen on Access.
792+
* @spec openspec/changes/admin-settings-tabs/specs/fe-settings-ui/spec.md#requirement-the-admin-page-is-one-shell-with-tabs
793+
*/
794+
sectionName() {
795+
return this.part === 'templates' ? t('stackiq', 'Email templates') : 'Email Configuration'
796+
},
797+
798+
/**
799+
* @return {string} The card subtitle.
800+
* @spec openspec/changes/admin-settings-tabs/specs/fe-settings-ui/spec.md#requirement-the-admin-page-is-one-shell-with-tabs
801+
*/
802+
sectionDescription() {
803+
return this.part === 'templates'
804+
? t('stackiq', 'The mails for registration, activation, new accounts and password reset.')
805+
: 'Configure email settings for notifications and user management'
806+
},
807+
739808
/**
740809
* @return {boolean} Whether no transport is set, so no mail goes out.
741810
* @spec openspec/changes/mail-template-editor-saves/specs/email-delivery/spec.md#requirement-the-settings-say-when-mail-is-not-being-sent-req-011
@@ -745,8 +814,15 @@ export default {
745814
},
746815
},
747816
817+
/**
818+
* Load the templates, only where the template editor is drawn.
819+
*
820+
* @spec openspec/changes/admin-settings-tabs/specs/fe-settings-ui/spec.md#requirement-the-admin-page-is-one-shell-with-tabs
821+
*/
748822
async created() {
749-
await this.loadTemplates()
823+
if (this.showsTemplates) {
824+
await this.loadTemplates()
825+
}
750826
},
751827
752828
methods: {

0 commit comments

Comments
 (0)