element-hq / element-hq/synapse
[Documentation improvement] Command to grant Server Admin isn't fully explained
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
### Description
I'm spinning up a new Matrix ecosystem with Synapse and of course Postgresql, and I have urges to do Admin stuff, such as with the Synapse-Admin tooling.
In this particular deployment it's configured to ONLY allow users to login via LDAP/Active Directory interfacing, so localdb and local user/creds is intentionally disabled for Synapse.
When logging in with said LDAP/AD user it is (so far as I can tell) correctly created in the Synapse system and in-turn database.
As per the documentation here: https://element-hq.github.io/synapse/latest/usage/administration/admin_faq.html?highlight=faq#how-do-i-become-a-server-admin
To grant target user Server Admin (so I can do useful things with Synapse-Admin, for example) I need to run this command (adapted to the correct User and HomeServer):
```sql
UPDATE users SET admin = 1 WHERE name = '@user:domain.com';
```
This change is reflected immediately in the database, but in my testing the Synapse instance is not convinced that user is now a Server Admin until the Synapse instance is restarted (in this case container is restarted).
The documentation on above linked URL does not mention this whatsoever, and I recommend that this (or appropriate verbiage) be added to that page as it took me a while to figure it out.
No, I'm not going to send a PR as I have a lot already on my plate, I'm taking the time to write this bug report, and while I can appreciate this is lower on the priority list, I still think that this is worth improving in said documentation. Additionally I am unaware if there is some way to trigger Synapse to "reload"/"reread" database contents that I just don't know yet, so I'm honestly not sufficiently qualified to write said documentation anyways.
Hope this helps some other $futureHuman.
### Steps to reproduce
- list the steps
- that reproduce the bug
- using hyphens as bullet points
### Homeserver
self-hosted one
### Synapse Version
all
### Installation Method
Docker (matrixdotorg/synapse)
### Database
postgresql 17
### Workers
Single process
### Platform
platform is irrelevant
### Configuration
_No response_
### Relevant log output
```shell
M_FORBIDDEN (403): You are not a server admin
```
### Anything else that would be useful to know?
_No response_
Contributor guide
Research direction
Start with the “How do I become a server admin?” section of the linked Synapse admin FAQ and verify whether a restart or another supported reload is required after the SQL update. Update that documentation with the confirmed behavior and validate the documentation build or checks if available; done means the procedure explains when the new admin status takes effect.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, postgresql, python
- Domain
- backend, documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100