mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
Simplify stream access denied error message.
Otherwise, we'll report that a stream is invite-only when it isn't. (imported from commit 441db1c84fb19bdf564251a1bd80ace23151783d)
This commit is contained in:
@@ -2044,7 +2044,7 @@ class InviteOnlyStreamTest(AuthedTestCase):
|
||||
email = "othello@zulip.com"
|
||||
self.login(email)
|
||||
result = self.common_subscribe_to_streams(email, ["Saxony"])
|
||||
self.assert_json_error(result, 'Unable to access invite-only stream (Saxony).')
|
||||
self.assert_json_error(result, 'Unable to access stream (Saxony).')
|
||||
|
||||
# authorization_errors_fatal=False works
|
||||
email = "othello@zulip.com"
|
||||
|
||||
@@ -1442,7 +1442,7 @@ def add_subscriptions_backend(request, user_profile,
|
||||
authorized_streams, unauthorized_streams = \
|
||||
filter_stream_authorization(user_profile, existing_streams)
|
||||
if len(unauthorized_streams) > 0 and authorization_errors_fatal:
|
||||
return json_error("Unable to access invite-only stream (%s)." % unauthorized_streams[0].name)
|
||||
return json_error("Unable to access stream (%s)." % unauthorized_streams[0].name)
|
||||
# Newly created streams are also authorized for the creator
|
||||
streams = authorized_streams + created_streams
|
||||
|
||||
|
||||
Reference in New Issue
Block a user