Users – system description
The system view of base users: endpoints, the quota and client-binding steps of creation, invitation and password reset, deletion protection and permissions.
Overview
View of the base users: list, form, status, API key, portal link, invitation and password reset. Table names carry the installation's own prefix in the database. Involved: the base user and group tables, user_api_key, portal stores, person (link), user_feature, subscription_account, usage.
Super-admin-only endpoints
user.list, user.form, user.status, user.token and user.tokendelete (API key in user_api_key), user.portalinfo, user.portaldomain, user.portalsend (portal link, store choice, sending via Dlbtmail::dispatch), user.delete. All require isSuper(). Deletion does not delete oneself; with references (getUserLinks) it lists them and refuses; otherwise deleteUser.
Creation (add, SUBSCRIPTION)
- Permission:
canSave($route, 0)→canAction(add). - Validation: username at least 3, e-mail, password at least 4 characters.
- Quota:
Dlbtquota::checkAction(creator, 'user/user', 'add', 1)– withneed_creditorneed_planan error plus offer data for the modal. addUser()with the posted group,fillUserRoleFromGroup().- If the creator has a home client:
attachUserToClient()andsyncClientPlan(client, creator, new_user). consumeAction(); optional person link (person_id);json.redirectto the form.
Editing and invitation
edit:canSave($route, id)→canAction(edit);editUser(), on group changefillUserRoleFromGroup().invite(user.invite,user.passwordreset,user.inviterevoke): invitation or password reset link by e-mail (Dlbtmail::dispatch), with a log (dlbtlog); revocation invalidates the user's open invitation tokens. Permission:canAction(invite); e-mail and account must exist.
Permissions and limitations
- In the seed
listisUNMAPPEDandstatusdeleteBASE– the controller checks neither.edit,invite,debugare not classified. - Creation does not restrict which user group can be chosen.
- Editing does not check the target user's content scope.