Operator guideEN

Staff / Form

Combined create and edit workflow for one backoffice administrator account, including role, group, parent-admin, and permission matrix rules.

How to use this guide

Start with the main guide

Follow the explanation and examples first. Extra definitions and formulas are available below when you need them.

What this form does

Use this form family to create a new admin account or update an existing one. The surface covers identity fields, role and group assignment, parent-admin logic for support users, and the stored permission matrix, but create and edit do not behave identically.

Create vs edit

Create

  • The create flow is used for new CRM administrator accounts.
  • Password is part of the initial payload.
  • Only Manager and Support are offered as visible role options.
  • Permission cards appear only after the role choice is made, and support mode also requires a selected parent admin.
  • Backend hierarchy rules can still reject a support create that looked selectable in the browser. For original-superadmin operators, the selected support parent must resolve to an Admin-level parent.

Edit

  • The edit flow first loads the existing admin detail payload.
  • Password is optional on update and is only replaced when changed.
  • The FE edit surface keeps role read-only and limits some field edits based on the current role rules.
  • When the current operator edits their own account, the permission matrix is hidden.

Permission behavior

  • Permission checkboxes are not free-form. The FE requires the read permission R before non-read options can be enabled in the same category.
  • Create-mode support-user flows seed permissions from the selected parent-admin detail payload.
  • Create-mode manager flows seed permissions from the current operator detail payload.
  • Edit mode renders permission categories from the current operator permission map, not from a separate role template registry.

JSON helper actions

Both create and edit forms include Export JSON and Import JSON helper actions. These are browser-local form helpers:

  • Export JSON downloads the current permission, group, and role values as staff-config.json.
  • Import JSON reads a local JSON file, skips password, filters imported permissions to the currently available permission source, and does not save anything until Submit.
  • In edit mode, imported role is skipped because role is read-only.

What can confuse operators

  • A role name alone does not fully describe access. The permission matrix is the detailed source of truth.
  • Group and parent-admin behavior changes with the selected role.
  • Editing your own record can be more restricted than editing another admin account.
  • The current forms do not expose a dedicated Cancel or back action; the only form-level action is Submit.
  • The current create implementation for Support attempts one support-scoped create and then falls through to a second create call with adminId: null.
  • In edit mode, the disabled Parent Admin display for support users is read-only context and should not be treated as a reliable parent reassignment control.
More details

Definitions and formulas

Open only the section you need. The relevant section opens automatically when you request help for a specific item on screen.

Calculations6 topicsOpen details

Create versus edit shell

The same conceptual form family has different required fields, disabled fields, and backend behavior depending on route.

Inputs
Create Staff route, Edit Staff route, Submit
Transform
Create uses the create form shell and sends the create request; edit uses the edit form shell, loads existing details, and sends the update request.
Caveats
Both routes show `Submit`, but create and edit are different backend mutations., Export JSON and Import JSON are browser helpers and do not save the account.

Permission-source gating

Permission choices are constrained by the selected role path and by an existing admin permission source.

Inputs
Role, Parent Admin, current operator details, parent admin details
Transform
Create mode shows permission cards after Manager loads current-operator permissions or after Support loads selected parent-admin permissions.
Caveats
Support cannot expose permission cards until a parent admin is selected and loaded., Toggle all clears or repopulates from the active permission source., Backend hierarchy rules still apply after FE permission seeding; support creates can be rejected if the selected parent is not valid for the operator's role path.

Support create double-submit

Support create can produce duplicate/error behavior and should be treated as a product caveat until fixed.

Inputs
Role = Support, Parent Admin, Submit
Transform
In create mode, the current Support branch awaits one create request with the selected parent admin id, then falls through and sends a second create request with `adminId: null`.
Caveats
This is current FE implementation evidence, not an intended operator workflow., Backend duplicate email/username checks should reject the second request if the first one succeeds, but the UI still attempts it.

Edit restrictions and self-edit lock

Edit is intentionally narrower than create and can hide permission editing when the operator edits their own account.

Inputs
edited staff role, current operator id, edited staff id
Transform
Edit mode disables role, disables group unless the edited staff role is Manager, displays parent admin as disabled for Support, and hides permissions for self-edit.
Caveats
Hidden permissions are not a permission deletion by themselves; they are a UI restriction before submit., The disabled Parent Admin control is display-only context and should not be interpreted as an editable parent relation.

Password transport and change check

On edit, leaving password empty preserves the existing password.

Inputs
Password, Submit, existing backend password hash
Transform
Browser base64-encodes the form password before create or update; backend create encrypts it, while backend update rewrites password only when the incoming value is non-empty and differs from the current password.
Caveats
Base64 is transport formatting in the frontend, not password storage encryption., Backend performs the actual password encryption before storage.

Staff config JSON import/export

JSON import/export is a form-helper for reusing allowed permission configuration, not a saved backend configuration.

Inputs
Export JSON, Import JSON, permission, group, role
Transform
Export writes current permission, group, and role values to `staff-config.json`; import parses a local JSON file, skips unsafe keys, and filters permissions to the active source.
Caveats
Export does not include password., Import skips password., Edit import skips role because role is disabled., Personal fields are not overwritten when already filled.
Fields9 topicsOpen details

Email

Login email and main staff identifier. Must stay unique.

Group
identity
Data Type
string
Validation
Create: Required email, maximum 200 characters. | Edit: Required email, maximum 200 characters.
Backend Rules
Backend lower-cases email on create., Backend service caps email length at 150 characters., Backend validates uniqueness on create and when changed on update.

Password

Initial password on create, optional password replacement on edit.

Group
identity
Data Type
password
Validation
Create: Required, minimum 1 character, maximum 50 characters. | Edit: Optional, maximum 50 characters.
Caveats
FE base64-encodes the entered value before sending it to backend create or update., The backend only replaces the stored password when the value actually changes during update.

First Name

First name shown on the view screen and staff list.

Group
identity
Data Type
string
Validation
Create: Required alphabetic value with optional single space, minimum 3 characters, maximum 200 characters. | Edit: Required alphabetic value with optional single space, minimum 3 characters, maximum 200 characters.
Backend Rules
Backend service uses a stricter alphanumeric 3 to 50 character validation.

Last Name

Last name shown on the view screen and staff list.

Group
identity
Data Type
string
Validation
Create: Required alphabetic value with optional single space, minimum 3 characters, maximum 200 characters. | Edit: Required alphabetic value with optional single space, minimum 3 characters, maximum 200 characters.
Backend Rules
Backend service uses a stricter alphanumeric maximum 50 character validation.

Username

Backoffice username stored on the staff record and checked for uniqueness.

Group
identity
Data Type
string
Validation
Create: Required letters-only value, minimum 8 characters, maximum 100 characters. | Edit: Required value that starts with a letter and then allows letters, numbers, or underscore; minimum 3 characters, maximum 100 characters.
Backend Rules
Backend allows a value starting with a letter followed by letters, numbers, or underscore, with service length constraints., Backend checks username uniqueness on create and when changed on update.
Caveats
0: Create Validation Is Stricter Than Edit Validation And Stricter Than The Backend Service: create accepts only letters and requires at least 8 characters.

Role

Primary access tier for the admin account.

Group
access
Data Type
enum
Options
Create: Manager, Support | Edit: current role only
Caveats
Create exposes only `Manager` and `Support`., The FE edit form keeps role read-only after creation., Backend rejects direct Superadmin role creation.

Group

Operator grouping used to segment admin accounts.

Group
access
Data Type
string
Validation
Create: Required alphanumeric value with spaces, minimum 3 characters, maximum 200 characters. | Edit: Nullable alphanumeric value with spaces, minimum 3 characters, maximum 200 characters when filled.
Caveats
Create options come from distinct existing staff groups., Edit disables Group unless the edited staff role is `Manager`.

Parent Admin

Parent-admin link used on support-user flows.

Group
access
Data Type
relation
Caveats
Create mode shows this selector only when role is `Support`., Edit mode shows it as a disabled display-only field for support users., Selecting a parent admin in create mode also loads that admin's permission matrix as the available source., Backend can reject a support create if the selected parent does not satisfy role hierarchy rules., In edit mode, the disabled display is read-only context and is not a trusted parent reassignment control.

Permissions

Stored category-by-category permission matrix for the admin user.

Group
permissions
Data Type
permission-matrix
Caveats
The FE requires read permission `R` before non-read permissions can be enabled in the same category., Create mode renders the matrix only after the role path has a permission source., Edit mode hides the matrix when the current operator edits their own account.
More help

Related pages

Backoffice / Staff

Operator documentation for backoffice administrator accounts, including list, create or edit, read-only inspection, and permission review.

Staff / Detail Model

Shared detail payload for one admin account, used by both the read-only view page and the edit form.

Staff / List

Staff inventory with search, create navigation, view or edit entrypoints, and a restricted demo-admin action.

Staff / Permissions

Read-only explanation of the permission matrix shown inside the staff view workspace.

Staff / View

Read-oriented staff workspace with overview fields and a dedicated permissions tab.

Affiliate Deals / Form

Create and edit form for affiliate deals, including PID, date window, commercial terms, and responsible person.