Skip to content

Conversation

@Bilb
Copy link
Collaborator

@Bilb Bilb commented Jan 13, 2026

PR made from https://codeberg.org/gravel/session-desktop

My fork is somewhat documented at https://sessioncommunities.online/handbook/#additional-moderator-tools:

  • (message right click menu) The Allow sending attachments and Remove attachment exception options allow moderators to grant or revoke upload permissions for regular users.
  • (message/room nav right click menu) The Ban User from Server and Unban User from Server options allow global moderators to ban a user from all Communities on a given server.
  • (conversation options) The Edit Permissions submenu allows admins to set default permissions for a given Community.

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:

  • Both options (+u and =u) are visible at the same time.
  • Users without +u can still attempt to upload (upstream issue).

These are fixable, but I don't have the in-depth knowledge. Namely:

  • Clients don't track user permissions.
  • Clients will let users upload the rooms regardless of permission.
  • No code path for replying to media messages without +u (thumbnail reupload).

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:

  • All of +rwua options are on by default when editing room permissions.
  • Non-global admins see global ban buttons.
  • Have to roll your own SOGS If you need "server ban and delete all".
  • I use some legacy UI code.

And the issues to fix before merging these:

  • Clients do fetch, but don't track room permissions.
  • Clients do fetch, but don't track self global mod status.
  • "Ban from Server and Delete All" is only supported on the dev branch of pysogs. Also, needs a marker in 'capabilities'.
  • My room permission submenu would need new UI code.

¹ 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.

ianmacd and others added 30 commits January 31, 2023 01:51
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants