Skip to content

History of commits

4473 commits

fix(auth): derive the login name of a nickname the same way everywhere

LoginName makes users.name_lat of a nickname and holds the rules a nickname is checked by; registration, external sign-in, the panel, the profile, the user search and the installer all use it. The installer only lowercased the nickname, so an administrator with a space or Cyrillic in it could not sign in. AccountByLogin finds the account at the sign-in and at the password recovery by the nickname as typed, then by the login name, and renews an outdated login name on sign-in when it is free. A nickname of nothing but symbols is refused. The profile keeps the nickname as typed.
simba77 24. Okt 2026 21:52 Branch: 10.x 65e36c1

feat(admin): manage the bans of an account in the panel

The ban logic moves to the core: BanAccess, BanRepositoryInterface and BanManager (give, lift, delete, clear the history, with the karma penalty), named kinds BanKind and duration units BanDurationUnit. The profile of the site calls them instead of its own use cases, so its behaviour stays as its tests pin it. The page of an account gets a Bans tab: the history, a ban given in a dialog with the kinds and lengths the visitor may give, lifting, deleting a record and clearing the history confirmed in dialogs. The Ban action of the list opens that dialog instead of the profile of the site.
simba77 24. Okt 2026 21:29 Branch: 10.x fb695b8

feat(admin): edit an account, its password and its settings from the panel

/admin/users/{id}/edit changes the whole profile and the fields of the staff (nickname, gender, karma, notes); /admin/users/{id}/password sets a new password and may sign the account out everywhere; resetting the settings is confirmed in a dialog. Each needs the core permission and nobody reaches up the hierarchy (UserEditAccess). The panel stores the text as typed; what the profile of the site stored escaped reads back as its text. A new nickname brings a new name_lat, so the account signs in under it.
simba77 24. Okt 2026 18:20 Branch: 10.x f534263

feat(admin): give every account a page of its own in the panel

/admin/users/{id} shows the account without the profile module: roles and state, contacts and dates, what the user told about themselves, activity, the bans in force, where they came from and the notes of the staff, each part for whoever may see it. The list and the dialogs lead there; Open on the site appears only while the profile module is switched on. The actions on an account move to UserActionsMapper, shared by the row of the list and the page. A hidden address in the list is shown only to whoever may read hidden addresses. New components: facts. New core enum Johncms\Users\BanKind names the kinds of a ban.
simba77 24. Okt 2026 18:12 Branch: 10.x 9fedb71

refactor(auth): declare the permissions on other accounts in the core

Opening an unconfirmed account, editing a profile, changing a password, resetting settings, reading notes and hidden addresses, and all the ban permissions move from ProfilePermissions to CorePermissions::USERS_*. The admin panel is about to use them, and the permissions of a module are purged from the roles when the module is removed. The keys are unchanged, so granted roles keep them; the Russian titles moved to the system domain with them.
simba77 24. Okt 2026 18:05 Branch: 10.x da3ffda

feat(admin): confirm the removal of accounts in a dialog

Deleting an account and removing the accounts waiting for approval - one, all from an address, all of them - is confirmed in a dialog saying what would go, opened over the list. A link with data-admin-modal opens its address in the modal of the layout (modal.js); the controller answers the request of the script with the dialog alone and a plain visit with the same dialog as a page, so the profile and the panel without the script keep working. Every action on the list returns to the page of the list it was taken from (back), checked against the list. New confirmation URLs: GET /admin/registrations/{id}/delete, /admin/registrations/delete-all, /admin/registrations/delete-by-ip.
simba77 24. Okt 2026 17:53 Branch: 10.x c41b831