element-hq / element-hq/synapse

block_non_admin_invites ingoring user admin status

Open
#18,908 5 comments 0 reactions 0 assignees View on GitHub
A-Admin-API T-Enhancement
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

### Description

On a homeserver instance with `block_non_admin_invites: true`, I was unable to create room invites or initiate DMs despite being marked as admin in the database.
Setting `block_non_admin_invites: false` fixed this issue.

NOTE: I am using MAS for user authentication, not sure whether the issue occurs without that or not.

### Steps to reproduce

- create homeserver configured with MAS (via `msc3861`), and `block_non_admin_invites: true`
- register users `@user1` and `@user2`
- run DB query `UPDATE users SET admin = 1;` (make all users admin)
- as `@user1`, create a space, set to invite-only.
- create another room inside the space, set to "visible to all space members".
- invite `@user2` to the space, either via the invite menu or by generating an invite link for the space.
- get missing permissions error despite being an administrator

### Homeserver

private homeserver

### Synapse Version

ghcr.io/element-hq/synapse:v1.138.0

### Installation Method

Docker (matrixdotorg/synapse)

### Database

PostgreSQL 17

### Workers

Single process

### Platform

docker on Ubuntu 24.04

### Configuration

`block_non_admin_invites: true`

### Relevant log output

```shell
N/A
```

### Anything else that would be useful to know?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.