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
cc197a61
"README.md" did not exist on "bca3b91c2dfeb63b43c3bfbb6700a38d4903f1eb"
Commit
cc197a61
authored
6 years ago
by
Erik Johnston
Browse files
Options
Downloads
Patches
Plain Diff
Disable publishing to room list when its disabled
parent
2c904221
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/handlers/directory.py
+8
-0
8 additions, 0 deletions
synapse/handlers/directory.py
with
8 additions
and
0 deletions
synapse/handlers/directory.py
+
8
−
0
View file @
cc197a61
...
@@ -44,6 +44,7 @@ class DirectoryHandler(BaseHandler):
...
@@ -44,6 +44,7 @@ class DirectoryHandler(BaseHandler):
self
.
appservice_handler
=
hs
.
get_application_service_handler
()
self
.
appservice_handler
=
hs
.
get_application_service_handler
()
self
.
event_creation_handler
=
hs
.
get_event_creation_handler
()
self
.
event_creation_handler
=
hs
.
get_event_creation_handler
()
self
.
config
=
hs
.
config
self
.
config
=
hs
.
config
self
.
enable_room_list_search
=
hs
.
config
.
enable_room_list_search
self
.
federation
=
hs
.
get_federation_client
()
self
.
federation
=
hs
.
get_federation_client
()
hs
.
get_federation_registry
().
register_query_handler
(
hs
.
get_federation_registry
().
register_query_handler
(
...
@@ -411,6 +412,13 @@ class DirectoryHandler(BaseHandler):
...
@@ -411,6 +412,13 @@ class DirectoryHandler(BaseHandler):
if
visibility
not
in
[
"
public
"
,
"
private
"
]:
if
visibility
not
in
[
"
public
"
,
"
private
"
]:
raise
SynapseError
(
400
,
"
Invalid visibility setting
"
)
raise
SynapseError
(
400
,
"
Invalid visibility setting
"
)
if
visibility
==
"
public
"
and
not
self
.
enable_room_list_search
:
# The room list has been disabled.
raise
AuthError
(
403
,
"
This user is not permitted to publish rooms to the room list
"
)
room
=
yield
self
.
store
.
get_room
(
room_id
)
room
=
yield
self
.
store
.
get_room
(
room_id
)
if
room
is
None
:
if
room
is
None
:
raise
SynapseError
(
400
,
"
Unknown room
"
)
raise
SynapseError
(
400
,
"
Unknown room
"
)
...
...
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