People and access — configuration
For the person setting this up. What the flags do, what the permissions mean, and the one question every customer asks first.
The shape, in one paragraph
One person, an optional login, an optional employment record. A person is a human who works for you. A login is a way of signing in. The two are separate because most of a distributor's floor has the first and not the second — and because a login is global (one email, one password, one set of sessions) while employment belongs to the company that employs somebody.
Somebody who works for two of your legal entities has two person records and one login. Their job title at each is a different fact; their password is not.
The app
| Key | Default | What it adds |
|---|---|---|
hr | Off | Six fields on a person: job title, department, manager, start date, engagement type, site |
Switching it on adds those six fields to the form and the record. It adds nothing else. It is the seam an HR module grows into — not payroll, not leave, not reviews, not employment documents, none of which exists in the product.
Switching it off hides the fields and loses nothing. The values stay where they are and reappear if you switch it back on.
Writing one of those fields with the app off is refused rather than ignored, so an integration cannot quietly set a job title nobody will ever see.
Permissions
| Permission | Who should hold it |
|---|---|
person.read | Almost everybody who supervises somebody. Seeded to Manager, Sales, Warehouse and Accounting |
person.manage | Whoever maintains the staff list. Seeded to Manager |
Neither is seeded to ReadOnly. A directory with personal email addresses and phone numbers in it is personal data, and the ReadOnly role exists for somebody looking at business numbers.
person.read is not user.read. They answer different questions:
person.read— "who works here, and how do I reach them". A warehouse supervisor asks this daily.user.read— "who has access to this company's data, and as what". That is an administrative question and a narrower grant.
The people picker needs neither. Assigning a record to a colleague and mentioning one in a comment are not administrative acts, so the picker serves an id and a name to anybody with access to the entity — and nothing else, ever.
Passwords: the answer to the first question
No screen, endpoint or export anywhere in this product reveals an existing password, and none ever will. Passwords are hashed with argon2, which is a one-way function: the stored value cannot be turned back into the password, not by us, not by an administrator, and not by somebody who steals the database.
The reason is worth giving, because it is the first thing a customer asks and "security" is not an answer:
An administrator who can read a password can act as that user. Every audit entry they leave will name the wrong person. Your audit log — the thing you hand a regulator or an auditor, the thing that answers "who approved this" — becomes a record of what somebody appeared to do. That is a worse outcome than any convenience being asked for.
What to do instead is set a new one. An administrator can set a password directly for somebody who has no email or cannot wait; it is shown once, on screen, at the moment it is set, and the user is made to change it at their next sign-in. The audit log records that an administrator set it, so the history stays true.
Somebody with no work email
This is the normal case for warehouse and delivery staff, and everything is built around it working:
- they can exist as a person with no login at all;
- if they need to sign in, an administrator sets their password on screen rather than sending an invitation;
- the password is shown once and never again.
Do not invent an address to get past a form. Nothing requires one.
Departure
Recording a departure is one act. It:
- sets the person to Left, with a date and a reason;
- revokes every login they hold;
- ends every session immediately;
- keeps the person and all of their history.
It is one act rather than four buttons because a product with four buttons gets three of them done, and the one that gets missed is the session that is still open.
What is audited
Every change to a person writes an audit entry with the before and after values, except two fields: the personal email address and the phone number. That they changed is recorded; what they changed to is not, because an audit row repeats somebody's private contact details for ever and the audit log is kept much longer than the employment is.
Interaction with other apps
| App | What it changes here |
|---|---|
hr | Adds the six employment fields |
inventory | The site field lists your sites. With Inventory off, the directory still works and there is nothing to choose |
The people directory itself is base product. It is not optional, it has no flag, and it does not disappear when anything is switched off.
Logins and people are one list
Everybody who can sign in to this company is on its staff list. Inviting
somebody links the person with the same work email if there is one, or adds
them. A company set up before this can catch up with
POST /api/v1/people/adopt-logins (needs user.manage); running it twice
does nothing the second time.
One screen for people and sign-ins
/settings/users redirects to /settings/people?view=can_sign_in. The People
entry in Settings needs user.read (every seeded role holds it; ReadOnly,
which could always see who signs in, reads people this way). GET /people
accepts person.read or user.read.
What the list and record show about a login — role, state, last sign-in,
second factor, sessions — needs user.read; without it those columns and the
Sign-in and security tab are not drawn. The sign-in filters other than
No sign-in need user.read too.
The person record's actions use the same permissions as before: user.manage
to invite, suspend, reinstate and end sessions; user.set_password to set a
temporary password or reset a second factor; role.assign to change the role;
person.manage to edit or mark as left.