matrix-org / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://matrix-org.github.io/synapse
Apache License 2.0
11.83k stars 2.13k forks source link

Admin can't demote me in a room #16519

Open germain-gg opened 1 year ago

germain-gg commented 1 year ago

Description

There is a public room where I am moderator and do not have permissions to change power levels. And this does not work.

I have therefore asked an admin to demote me and they are getting this error

Failed to change power level M_FORBIDDEN: MatrixError: [403] You don't have permission to post that to the room. user_level (0) < send_level (100) (https://matrix-client.matrix.org/_matrix/client/v3/rooms/!YTvKGNlinIzlkMTVRl%3Amatrix.org/state/m.room.power_levels/)

Steps to reproduce

Homeserver

matrix.org

Synapse Version

latst

Installation Method

Docker (matrixdotorg/synapse)

Database

?

Workers

I don't know

Platform

?

Configuration

No response

Relevant log output

I don't have access to the logs

Anything else that would be useful to know?

Room ID: !YTvKGNlinIzlkMTVRl:matrix.org

clokep commented 1 year ago

The current power levels event seems to be:

{
  "content": {
    "ban": 50,
    "events": {
      "im.vector.modular.widgets": 50,
      "m.call.invite": 100,
      "m.room.avatar": 50,
      "m.room.canonical_alias": 50,
      "m.room.history_visibility": 100,
      "m.room.name": 50,
      "m.room.power_levels": 100,
      "m.room.topic": 50
    },
    "events_default": 0,
    "invite": 0,
    "kick": 50,
    "redact": 50,
    "state_default": 50,
    "users": {
      "@Amandine:matrix.org": 100,
      "@abuse:matrix.org": 100,
      "@andybalaam:matrix.org": 100,
      "@betabot:t2l.io": 50,
      "@dave:matrix.org": 50,
      "@germaingermain:matrix.org": 50,
      "@jryans:matrix.org": 50,
      "@jryans:vector.modular.im": 50,
      "@matthew:matrix.org": 100,
      "@richvdh:matrix.org": 50,
      "@richvdh:sw1v.org": 50,
      "@tom:lant.uk": 50,
      "@travis:t2l.io": 50,
      "@uhoreg:matrix.org": 50,
      "@x:riot.ovh": 50
    },
    "users_default": 0
  },
  "origin_server_ts": 1688986164831,
  "sender": "@abuse:matrix.org",
  "state_key": "",
  "type": "m.room.power_levels",
  "unsigned": {
    "replaces_state": "$2eol1tsuxj25RfQPRwqSmIn4lgk3rvaNBOulHMA0uXo",
    "age": 1247742240
  },
  "event_id": "$E5TBMb0nejB4Kd0JySVsVMZozus_fI9JwWc7gGHH-zI",
  "room_id": "!YTvKGNlinIzlkMTVRl:matrix.org"
}

I have therefore asked an admin to demote me and they are getting this error

Who attempted to demote you?

germain-gg commented 1 year ago

@andybalaam did

andybalaam commented 1 year ago

^ Attached a rageshake after re-attempting the change this morning.

clokep commented 1 year ago

Those don't have much other info it looks like:

2023-10-19T07:59:41.620Z D FetchHttpApi: --> PUT https://matrix-client.matrix.org/_matrix/client/v3/rooms/!YTvKGNlinIzlkMTVRl%3Amatrix.org/state/m.room.power_levels/
2023-10-19T07:59:44.133Z D FetchHttpApi: <-- PUT https://matrix-client.matrix.org/_matrix/client/v3/rooms/!YTvKGNlinIzlkMTVRl%3Amatrix.org/state/m.room.power_levels/ [2513ms 403]
2023-10-19T07:59:44.136Z E Failed to change power level M_FORBIDDEN: MatrixError: [403] You don't have permission to post that to the room. user_level (0) < send_level (100) (https://matrix-client.matrix.org/_matrix/client/v3/rooms/!YTvKGNlinIzlkMTVRl%3Amatrix.org/state/m.room.power_levels/)
clokep commented 1 year ago

From the database it looks like the current power level event is $Bl2HOl-7hwVRKdpRBSi3HgdP9GH46IoKTVj5WsD6zPs, not $E5TBMb0nejB4Kd0JySVsVMZozus_fI9JwWc7gGHH-zI, so I suspect #8629 is the cause of what's going on here.