Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
36a7ff0c
Commit
36a7ff0c
authored
3 years ago
by
Patrick Cloke
Committed by
Patrick Cloke
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Do not show invite-only rooms in spaces summary (unless joined/invited). (#10109)
parent
3fdaf4df
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changelog.d/10109.bugfix
+1
-0
1 addition, 0 deletions
changelog.d/10109.bugfix
synapse/handlers/space_summary.py
+9
-10
9 additions, 10 deletions
synapse/handlers/space_summary.py
with
10 additions
and
10 deletions
changelog.d/10109.bugfix
0 → 100644
+
1
−
0
View file @
36a7ff0c
Fix a bug introduced in v1.35.0 where invite-only rooms would be shown to users in a space who were not invited.
This diff is collapsed.
Click to expand it.
synapse/handlers/space_summary.py
+
9
−
10
View file @
36a7ff0c
...
...
@@ -26,7 +26,6 @@ from synapse.api.constants import (
HistoryVisibility
,
Membership
,
)
from
synapse.api.errors
import
AuthError
from
synapse.events
import
EventBase
from
synapse.events.utils
import
format_event_for_client_v2
from
synapse.types
import
JsonDict
...
...
@@ -456,16 +455,16 @@ class SpaceSummaryHandler:
return
True
# Otherwise, check if they should be allowed access via membership in a space.
try
:
await
self
.
_event_auth_handler
.
check_restricted_join_rules
(
state_ids
,
room_version
,
requester
,
member_event
if
self
.
_event_auth_handler
.
has_restricted_join_rules
(
state_ids
,
room_version
):
allowed_spaces
=
(
await
self
.
_event_auth_handler
.
get_spaces_that_allow_join
(
state_ids
)
)
except
AuthError
:
# The user doesn't have access due to spaces, but might have access
# another way. Keep trying.
pass
else
:
return
True
if
await
self
.
_event_auth_handler
.
is_user_in_rooms
(
allowed_spaces
,
requester
):
return
True
# If this is a request over federation, check if the host is in the room or
# is in one of the spaces specified via the join rules.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment