Skip to content

People and roles

Settings → People, admin only. Everyone with an account, and what each of them may do.

/admin redirects here.

The list

Name, address, role, and the rate-limit switch. Searchable across all three.

Roles

Role The page's own words
user Studies. Can make their own tests.
moderator Writes and edits the library, and marks what is high yield.
admin Everything, including this page.

PUT /admin/users/{user_id}/role accepts all three. The other role endpoint — PUT /access/{user_id}/role, on the Access page — accepts only user and moderator and is moderator-gated. They are not interchangeable.

You cannot change your own role here.

If the provider decides roles, this is not where to do it

With OIDC_ROLE_CLAIM set and a group list configured, both role endpoints answer 409 instead of writing, because anything set here would be overwritten at the person's next sign-in. The message names the fix: change their group at the provider.

The sync refuses exactly one demotion — the last administrator. See Roles come from the identity provider.

Rate limits

PUT /admin/users/{user_id}/unthrottle sets a per-person exemption from the AI and speech limits.

check_rate_limit exempts three kinds of caller before it touches Redis: admins, moderators, and anybody explicitly unthrottled. So the switch is only ever needed for a learner.

It is also a fail-open limiter: if Redis is unreachable it lets the call through rather than blocking everybody. The limits it enforces are the daily ones — 60 AI Mode messages and 30 tutor messages — along with the contact form, token refresh and speech.

Deleting an account

DELETE /admin/users/{user_id}, admin only, and you cannot delete yourself.

Everything the person owns goes with them — attempts, answers, favourites, notes, collections, settings — because every foreign key to users is CASCADE or SET NULL.

Two exceptions, handed over rather than deleted. question_categories and quiz_categories name a user in a NOT NULL column with NO ACTION, so those rows are reassigned to the administrator doing the deleting. The taxonomy is the site's, not the author's.

There is no soft delete and no bin for an account.

The 'Add someone' form does not work

The People panel has a + Add someone button whose form collects a name, an address and a password and posts to POST /admin/users. That endpoint does not existrouters/admin.py has no POST /users — so the form fails, and the password it asks for would be meaningless anyway: POST /auth/login answers 410 Gone and there is no password door on this site.

Accounts are created at the identity provider, which sends the person an invitation. Nothing in PedsHub creates one.