Implement server-wide open group user bans and unbans.#1772
Open
Implement server-wide open group user bans and unbans.#1772
Conversation
This adds to Session the ability to ban a user not just from a single group, but from an entire SOGS. To successfully ban (or unban) a user across a whole server, the executor must be a global moderator of the SOGS instance. When banning a user, the global moderator may opt to also remove all of the user's messages from the server. This requires PySOGS > 0.3.7 to allow the simultaneous deletion of messages from multiple groups. See oxen-io/session-pysogs@2c8e4f1. This has been tested with Session 1.10.4 in combination with `open.getsession.org` and `sog.caliban.org`, both of which have been updated to support server-wide banning.
New menu items are visible in Communities. One allows the target user to upload attachment, while the other clears this permission. This only has an effect in Communities where uploads are off, but the options are still shown. Furthermore, both options are shown at the same time. These limitations stem from the limited Open Group data model in the codebase.
added 17 commits
October 3, 2025 09:18
jagerman
pushed a commit
to session-foundation/session-pysogs
that referenced
this pull request
Jan 28, 2026
This change allows Session clients to check whether the SOGS supports "Ban from Server and Delete All". This is a follow-up to oxen-io#167, which added server-wide message deletion capabilities. As this change has not been released, few SOGS support this useful capability, and clients cannot know in advance whether the deletion request will be honored. Ideally, clients should let users know if this feature is not supported. This may be required from the official Desktop client in session-foundation/session-desktop#1772.
9482711 to
0e508e6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR made from https://codeberg.org/gravel/session-desktop
The PR has been cleaned and has server-wide features blocked behind a feature flag.
This needs those strings to be added to crowdin.
For server wide deletions, we need to check the capabilities of the sogs
session-foundation/session-pysogs@fd231f8
My fork is somewhat documented at https://sessioncommunities.online/handbook/#additional-moderator-tools:
My fork can set +u and =u on users, ban/unban users server-wide, and set +/-rwua on rooms.¹
It's not easy to merge, but the first one (upload permission) would be a priority.²
My implementation has issues:
These are fixable, but I don't have the in-depth knowledge. Namely:
For my fork, I had to write custom CI code for Woodpecker.
I would appreciate help with building my fork for Windows
... You could try mirroring it to GitHub and see if it builds.
Notes for global bans and room permission editing:
And the issues to fix before merging these:
¹ Fork features: https://sessioncommunities.online/handbook/#additional-moderator-tools
² Upload permission support is lacking. Global bans are used just by a few people and admins use special commands for +w/-w; see https://codeberg.org/gravel/pysogs-sql-triggers.