element-hq / element-hq/element-meta

Publishing room to homeserver room directory should not require m.room.canonical_alias permission

Open
#287 2 comments 7 reactions 0 assignees View on GitHub
T-Enhancement X-Needs-Product
Dominant language
No language data
Stars
112
Forks
25
Avg merge
6h 6m
Merged PRs (30d)
4

Description

![image](https://user-images.githubusercontent.com/999188/83149089-025ae180-a0fa-11ea-8052-dfa58d448fde.png)

### Description

On current riot.im/app (1.6.2), not having the `m.room.canonical_alias` room permission disables all controls in _Room settings -> Room Addresses_, including the _Publish this room to the public in tcharles.fr's room directory?_ switch.
I don't think this is expected behaviour as the permission for this feature is set in Synapse config (`room_list_publication_rules`), and querying directly the endpoint using curl (PUT on `_matrix/client/r0/directory/list/room/:roomID`) is still allowed without having the m.room.canonical_alias permission.

### Steps to reproduce

- Using a default synapse instance (or matrix.org)
- Create an empty room
- Demote yourself to Default or invite a new user
- Open _Room settings -> Room Addresses_, the publish button is disabled and can't be toggled.

Logs being sent: no

### Version information

- **Platform**: web
- **Browser**: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0
- **OS**: Windows
- **URL**: riot.im/app

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in the web client's Room settings → Room Addresses controls and trace the permission check against m.room.canonical_alias; compare it with the PUT _matrix/client/r0/directory/list/room/:roomID behavior described here. Done means publishing can be toggled when the configured room-directory rule allows it, without requiring the canonical-alias permission, and the reproduction steps no longer show disabled controls.

Written by the indexing model from the issue text.

Assessment

Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.