Configuration · Staff member editor (levels, scope, API token)
Creates and edits a back-office account: identity, level, which centres and stores it can see, which dashboards it gets, channel and country, contactability, GDPR acceptance, employee-account-type access, an API token to copy, and an action to email the user a password link.
| Area | Configuration |
| Routes | configuration.staff-members.new · configuration.staff-members.edit |
| Centre modules | employees_segments |
| Staff levels | root · admin · manager |
| Models | building · center · channel · commerce · country · dashboard · staff-member · user-account-type |
| UI label | general-data |
| Coverage | 5 use cases · 2 happy · 10 failure |
Known issues (1)
Missing translations
These keys are used on this screen but do not exist in
translations.json, so users see the raw key:
access-to-account-types.clientaccess-to-account-types.employee-outsourceaccess-to-account-types.employee-shop
How it works
Scope is the heart of this form. allowedLevels is derived from the current user’s role through the creators arrays, so the UI cannot grant a level the actor is not entitled to grant. allowedCenters limits which centres can be assigned, and selectedCommercesFiltered / onChangeSelectedCommerces restrict a commerce-level account to its stores — enforced by a conditional validation (commerces required when level === 'commerce'). calibrator level requires a default building. dashboardsAssociatedToRole pre-selects the dashboards that match the chosen level. copyToken exposes an API token for external-level integrations (staff-member.copy-token-success). openModalSendPasswordEmail → confirmSendPasswordEmail is the invitation flow, with sendPasswordEmailIsDisabled guarding it, and disableSubmit blocking premature saves. When the centre has employee segments, accessToAccountTypes must be non-empty.
Use cases
Why someone opens this (5)
- Creating a store-level account scoped to a single tenant.
- Giving a regional manager access to several centres at once.
- Issuing an
externalaccount with an API token for a system integration.- Inviting a new user by emailing them a password link instead of setting a password manually.
- Restricting a CRM operator to specific employee account types.
Path map
flowchart LR F(["Staff member editor levels, scope, API token"]):::feat F --> H1["Store-level account created and invited"]:::ok F --> H2["API token issued"]:::ok F -.-> X1["Identity fields missing"]:::bad F -.-> X2["Commerce level without stores"]:::bad F -.-> X3["Calibrator without a default building"]:::bad F -.-> X4["Password invalid"]:::bad F -.-> X5["GDPR not accepted"]:::bad F -.-> X6["Contactable without a phone"]:::bad F -.-> X7["Employee account types missing"]:::bad F -.-> X8["Reference data unavailable"]:::bad F -.-> X9["Level not grantable"]:::bad F -.-> X10["Raw translation key on screen"]:::bad classDef feat fill:#566066,stroke:#566066,color:#ffffff,font-weight:bold classDef ok fill:#e3f1ea,stroke:#0d6b42,color:#0d4a2e classDef bad fill:#f7e6e2,stroke:#9a2d1c,color:#6e1f13
Happy paths
Store-level account created and invited
- Admin enters name, surname, email, channel and country and accepts GDPR on the user’s behalf.
- Level is set to
commerce, so the stores field appears and is filled.- Centres are assigned from
allowedCenters; dashboards default from the level.- The account saves, then
openModalSendPasswordEmail→confirmSendPasswordEmailemails the password link.- The user completes
update_password/:tokento set their own password.
API token issued
- Admin creates an
external-level account.copyTokencopies the bearer token andstaff-member.copy-token-successconfirms.- The integration authenticates with that token.
Failure paths
Identity fields missing
Cause — Name, surname, email, level, channel, country or centres blank.
What happens —
name-required,last-name-required,email-required,level-required,channel-required,country-required,centers-required.
Commerce level without stores
Cause —
level === 'commerce'andcommercesempty.What happens —
error.file.commerces.required(‘Select at least one shop’) — reused from the intranet-files namespace, so the message is correct but oddly namespaced.
Calibrator without a default building
Cause —
level === 'calibrator'anddefaultBuildingblank.What happens —
default-building-required.
Password invalid
Cause — Blank, or failing the 10-char mixed-case + digit format; confirmation mismatch.
What happens —
required+ pass,pass-format,match-pass.
GDPR not accepted
Cause —
eulafalse.What happens —
error.user.gdpr.
Contactable without a phone
Cause —
contactableticked with no phone number.What happens — Custom rule fails with
phone-required.
Employee account types missing
Cause — Centre has employee segments and
accessToAccountTypesis empty.What happens —
required+access-to-account-types.
Reference data unavailable
Cause — Buildings or channels fail to load.
What happens —
store.findAll(...).catch(() => [])degrades to empty pickers — the form still opens but the user cannot complete the required fields and is given no reason.
Level not grantable
Cause — The actor’s role is not in that level’s
creators.What happens — The level is absent from
allowedLevels.
Raw translation key on screen
Cause — The code references
access-to-account-types.client,access-to-account-types.employee-outsource,access-to-account-types.employee-shopbut the key does not exist in translations.json.What happens — ember-intl renders the missing key (or its missing-message placeholder) instead of text — visible to every user of this screen until the key is added.
QA checklist
Tick these off while regression-testing this feature. The boxes are plain Markdown, so progress is visible in git diffs.
- ✅ Store-level account created and invited
- ✅ API token issued
- ⛔ Identity fields missing
- ⛔ Commerce level without stores
- ⛔ Calibrator without a default building
- ⛔ Password invalid
- ⛔ GDPR not accepted
- ⛔ Contactable without a phone
- ⛔ Employee account types missing
- ⛔ Reference data unavailable
- ⛔ Level not grantable
- ⛔ Raw translation key on screen
Implementation
app/controllers/configuration/staff-members/new.jsapp/routes/configuration/staff-members/new.jsapp/models/staff-member.jsapp/enums/staff-levels.jsapp/enums/access-to-account-types.jsapp/enums/permissions.js
Translation keys (30)
Key English general-dataGeneral data staff-member.copy-token-successToken has been copied! name-requiredName is required last-name-requiredLast name is required email-requiredEmail is required level-requiredLevel is required channel-requiredThe channel is required country-requiredCountry is required centers-requiredCenters is required default-building-requiredA default building is required phone-requiredPhone is required pass-formatUse 10 or more letters, with at least 1 number, 1 capital letter and 1 lower letter match-passThe password fields do not match error.user.gdprThe GPDR should be accepted access-to-account-typesAccess to account types rootROOT adminAdmin content-creatorContent creator calibratorCalibrator commerceStore crm-managerCRM Manager crm-operatorCRM Operator external-apiExternal API managerManager ownerOwner scmanagerSC Manager store-managerStore Manager web-operatorAgency staff-level-salesSales staff-level-servicesServices
Related
- Same area — Centre list & export · Centre editor (modules, app config, integrations) · Staff member list, deletion & restore · Channels · Extra attributes · Email template preview & test send · Dashboard configuration · Influence zones · Server incidents · Server command runner (CLI) · Accessibility statement · Mobile app configuration · Customer login methods (Google, Facebook) · Third-party integrations & connectors · Social wifi & location services
- Shares data with — Customer list & filtering · Segment builder with automatic tag actions · In-app help & support chat (Froged) · Customer CSV import · Intranet communications (threads, confirmations, authorisations) · Centre switching & multi-centre scoping · Customer create & edit · Customer receipts tab & ticket-stamp generation
- Behind the same module — Segment builder with automatic tag actions
Generated from doc/feature-inventory.json · id config-staff-editor · commit 276788ca6