Skip to content

History of commits

4473 commits

refactor(profile): drop the forum post a ban form never received

The form of a ban carried the id of a forum post it was given for, read from ?fid=, but nothing links to the form with one and the id was never stored. Only an empty reason looked at it, so a ban without a reason is now always recorded as given for none.
simba77 24 oct. 2026 12:31 Branch: 10.x da326f1

fix(profile): keep the bans in force when the history is cleared

Clearing the history of an account deleted every ban it had, the ones still in force among them, which lifted them without a trace, and left their karma penalties behind. It now deletes the bans that have run out or were lifted, each the way deleting it alone does, penalty included.
simba77 24 oct. 2026 12:30 Branch: 10.x 62b1d07

fix(profile): take back the karma of a deleted ban only when it cost some

Deleting a ban always took twice the current karma points off the minuses of the account. A ban given while karma was off had cost nothing, so the deletion took away what other members had voted, and a change of the points since made the sum wrong. The penalty the ban recorded is deleted now, if there is one, and by the points it holds.
simba77 24 oct. 2026 12:29 Branch: 10.x 44246e6

fix(profile): lift and delete a ban only of somebody standing below

A ban was given downwards only but lifted by anybody holding the permission, so an administrator could end the ban the supervisor gave another administrator. Lifting a ban, deleting its record and clearing the history now ask the same as giving one (BanHierarchy), which also covers the ban of one's own, and the history offers those buttons only to whoever may press them.
simba77 24 oct. 2026 12:28 Branch: 10.x 905c0f1

fix(auth): let a ban close only what it is for

BanVoter refused every permission to an account under a ban of any kind, reading among them: a member banned from the guestbook for an hour could not open the forum, the library or the downloads, which a guest can, and a moderator banned from the library lost the panel. It now acts on the full ban alone and leaves such an account what a guest may do; the supervisor is not locked out. A ban of a section is asked for by that section. Several places relied on that refusal and asked for no ban themselves. The forum refuses everything that writes in it to an account banned from it or from the site (ForumBanMiddleware on the routes of the signed-in visitor) and offers it no reply, edit or poll form. The library does the same for its articles, their changes and the votes (LibraryAccess), and the downloads take no upload from an account banned from the site (DownloadsAccess).
simba77 24 oct. 2026 12:26 Branch: 10.x cd8034c

test(profile): record how the bans of an account are given and what they close

Pins the current behaviour before the bans are reworked, the odd parts included and marked as such: a ban of any kind refuses every permission, reading among them; a ban is lifted by anybody holding the permission; deleting a ban takes karma whether it cost some or not; clearing the history deletes the bans in force.
simba77 24 oct. 2026 12:18 Branch: 10.x afc91ef