James Rowan
71bc40d829
emails: Update subject for invitation emails.
2017-07-13 18:47:21 -07:00
James Rowan
88b8d98d34
emails: Update subject for missed message emails.
2017-07-13 18:47:17 -07:00
James Rowan
9bd1b0ba58
emails: Update subject for digest emails.
2017-07-13 18:47:02 -07:00
James Rowan
92c2d93ea3
tests: Enforce new custom sender names and addresses.
2017-07-13 14:50:36 -07:00
James Rowan
bb0be18bc5
emails: Make new login notifications come from 'Zulip Account Security.'
2017-07-13 14:50:36 -07:00
James Rowan
c1b89d1744
emails: Make confirm new email email come from 'Zulip Account Security.'
2017-07-13 14:50:36 -07:00
James Rowan
0369a9f3bf
emails: Make change in email notification come from 'Zulip Account Security.'
2017-07-13 14:50:36 -07:00
James Rowan
69f3ca7870
emails: Make password reset emails come from 'Zulip Account Security.'
2017-07-13 14:50:36 -07:00
James Rowan
a3b1631832
emails: Make the digest email come from 'Zulip Digest.'
2017-07-13 14:50:36 -07:00
James Rowan
cee28af91c
emails: Make the invitation email come from the referrer (via Zulip).
2017-07-13 14:50:36 -07:00
Vishnu Ks
098569ccb4
test_classes: Use get_user in unsubscribe_from_stream.
2017-07-13 14:13:03 -07:00
Vishnu Ks
99e78cbead
test_classes: Use get_user in get_streams function.
2017-07-13 14:13:03 -07:00
Vishnu Ks
466c3f92f9
test_subs: Replace iago@zulip.com with self.example_email('iago').
2017-07-13 14:13:03 -07:00
Sarah
db3539438c
test_events: Simplify testing code for bool user settings.
...
Use bool_change if the user_display setting property_type is bool, so that no additional code needs to be added to test_events for new boolean user display settings.
2017-07-13 14:07:54 -07:00
Cory Lynch
8afdb06e2a
search: Add test case for searching for a link.
...
Fixes #2038
2017-07-13 09:23:34 -07:00
Tim Abbott
6a914c83ef
docs: Fix indentation of DocPageTest.
2017-07-12 16:28:38 -07:00
Aditya Bansal
6100d43339
test_subs/test_users: Fix breaking tests due to regressions.
2017-07-13 01:56:26 +05:30
Tim Abbott
5acc7506ac
test_users: Fix GetProfileTest to test its original purpose.
...
This test accidentally got refactored to use some test suite library
functions that ended up somewhat defeating its purpose.
2017-07-12 13:03:38 -07:00
Vishnu Ks
63586480a5
test_subs: Replace hamlet@zulip.com with self.example_email('hamlet').
2017-07-12 12:49:12 -07:00
Vishnu Ks
6e133cc77a
test_subs: Eliminate redundant class variable realm.
...
The SubscriptionAPITest class variables `realm` and `test_realm` stores
the same information and are redundant. I have eliminated all occurances
of self.realm and replaced with self.test_realm.
2017-07-13 00:45:24 +05:30
Vishnu Ks
bf729c9a4d
test_classes: Use get_user in notification_bot fcuntion.
2017-07-13 00:45:24 +05:30
Vishnu Ks
f28b29177b
test_classes: Use get_user in mit_user function.
2017-07-13 00:45:24 +05:30
Vishnu Ks
0b701b52df
test_classes: Use get_user in example_user function.
2017-07-13 00:45:24 +05:30
Vishnu Ks
ed0423784d
test_realm_emoji: Replace get_user_profile_by_email.
...
Replace with get_user.
2017-07-13 00:45:24 +05:30
Vishnu Ks
80d0039e2c
test_helpers: Remove unused get_user_profile_by_email import.
2017-07-13 00:45:24 +05:30
Vishnu Ks
ba4ea7dd8a
notifications.py: Replace get_user_profile_by_email.
...
Replace with get_user.
2017-07-13 00:45:24 +05:30
Aditya Bansal
84e53f960d
pep8: Add compliance with rule E261 to tests/test_upload.py.
2017-07-11 15:17:32 -07:00
Aditya Bansal
1b5e3190e3
pep8: Add compliance with rule E261 to tests/test_subs.py.
2017-07-11 15:17:32 -07:00
Aditya Bansal
2643a40176
pep8: Add compliance with rule E261 to tests/test_signup.py.
2017-07-11 15:17:32 -07:00
Aditya Bansal
59b26e582a
pep8: Add compliance with rule E261 to tests/test_realm.py.
2017-07-11 15:17:32 -07:00
Aditya Bansal
0970d29ec1
pep8: Add compliance with rule E261 to tests/test_narrow.py.
2017-07-11 15:17:32 -07:00
Aditya Bansal
ce70ded488
pep8: Add compliance with rule E261 to tests/test_messages.py.
2017-07-11 15:17:32 -07:00
Aditya Bansal
8c233198f8
pep8: Add compliance with rule E261 to tests/test_events.py.
2017-07-11 15:17:32 -07:00
Aditya Bansal
ee97ea1356
pep8: Add compliance with rule E261 to tests/test_bugdown.py.
2017-07-11 15:17:32 -07:00
Aditya Bansal
d46cf59b0d
pep8: Add compliance with rule E261 to worker/queue_processors.py.
2017-07-11 11:55:02 -07:00
Aditya Bansal
1e3b57570e
pep8: Add compliance with rule E261 to tornado/websocket_client.py.
2017-07-11 11:55:02 -07:00
Aditya Bansal
94b790c28d
pep8: Add compliance with rule E261 to tornado/socket.py.
2017-07-11 11:55:02 -07:00
Aditya Bansal
73ad834129
pep8: Add compliance with rule E261 bugdown/__init__.py.
2017-07-11 11:53:33 -07:00
Aditya Bansal
f5d5c48831
pep8: Add compliance with rule E261 models.py.
2017-07-11 11:53:33 -07:00
Vishnu Ks
48617c5915
send_password_reset_email: Replace get_user_profile_by_email with get_user.
2017-07-11 11:48:21 -07:00
Vishnu Ks
aca4d18f23
generate_invite_links: Replace get_user_profile_by_email with get_user.
...
The extra refactoring is because the realm is made a compulsary
argument.
2017-07-11 11:48:21 -07:00
Umair Khan
782bfd1d7c
test_runner: Support only Django version >= 1.11.
...
In previous versions, the argument to run_subsuite is a tuple of
length 3, while in versions >= 1.11 it's a tuple of length 4.
2017-07-10 11:32:10 -07:00
Umair Khan
c31beec9e6
makemessages: Support only Django version >= 1.11.
2017-07-10 11:32:10 -07:00
Aditya Bansal
ec6fdd92d4
models: Add long_term_idle/last_active_message_id to UserProfile.
...
In this commit we are adding two new fields to the UserProfile
table. These fields are the:
long_term_idle: For storing a bool value representing status of user
being online in long time where 'long' will have a specific
definition.
last_active_message_id: For storing the message id which was last
updated into the UserMessage table for a particular user.
2017-07-10 12:31:50 -04:00
Vishnu Ks
8dd2268c3b
set_message_flags: Replace get_user_profile_by_email with get_user.
2017-07-08 14:40:55 -07:00
Vishnu Ks
0e76d95b9f
export_single_user: Replace get_user_profile_by_email with get_user.
2017-07-08 14:38:45 -07:00
Vishnu Ks
afc41dfb6b
rate_limit: Replace get_user_profile_by_email with get_user.
2017-07-08 14:38:45 -07:00
Vishnu Ks
1ce6b8db8c
remove_users_from_stream: Replace get_user_profile_by_email with get_user.
2017-07-08 14:38:45 -07:00
Vishnu Ks
038f2d669a
turn_off_digests: Replace get_user_profile_by_email with get_user.
2017-07-08 14:38:45 -07:00
Vishnu Ks
fdf3df4154
bulk_change_user_name: Replace get_user_profile_by_email with get_user.
2017-07-08 14:38:45 -07:00
Vishnu Ks
3b6d5fd80e
bankrupt_users: Replace get_user_profile_by_email with get_user.
2017-07-08 14:38:45 -07:00
Vishnu Ks
a5d2576801
deactivate_users: Replace get_user_profile_by_email with get_user.
2017-07-08 14:38:45 -07:00
Tim Abbott
b01e6d750f
management: Remove obsolete update_permissions management command.
...
This was part of the old Django/guardian-based permissions system.
2017-07-08 14:37:25 -07:00
Tim Abbott
3395f38bf7
management: Remove obsolete gravatar_to_user_avatar management command.
...
This was used for a 1-time migration in 2013, and definitely isn't
needed anymore.
2017-07-08 14:35:53 -07:00
Vishnu Ks
36972f611c
add_users_to_streams: Remove unused imports.
2017-07-08 14:35:42 -07:00
Vishnu Ks
4340b94a2d
create_user: Separate password help into multiple lines.
...
This line is too long and ./tools/lint --pep8 is failing because
of this.
2017-07-08 14:18:49 -07:00
rht
7a9de7766b
Add password argument to `manage.py create_user`.
...
Tweaked by tabbott to provide clear --help output recommending against
setting passwords this way.
2017-07-08 10:59:02 -07:00
Harshit Bansal
e926f72bea
notifications: Fix broken rendering of realm emoji in missed message emails.
...
We were using relative URLs for realm emojis in missed message emails.
Since the email server is not same as the Zulip server and doesn't
have the realm emoji files, they were rendered as broken images. This
commit fixes them to use absolute URL.
Fixes : #5692 .
2017-07-08 10:54:06 -07:00
neiljp (Neil Pilgrim)
32269ad142
mypy: Set type of rabbitmq_heartbeat to Optional[int] in queue.py.
2017-07-08 10:49:42 -07:00
neiljp (Neil Pilgrim)
07255d49d5
mypy: Add check for parse_user_agent returning None in compatibility.py.
2017-07-08 10:49:42 -07:00
Rishi Gupta
0f46fd86dd
urls: Rename arguments to accounts/unsubscribe.
...
type -> email_type to match future work on ScheduledJob.
token -> confirmation_key to match what the other confirmation views urls
call this argument.
2017-07-07 18:56:14 -07:00
Rishi Gupta
11a4cffba0
confirmation: Add explicit host in call to get_link_for_object in auth.py.
2017-07-07 18:56:14 -07:00
Rishi Gupta
b3654c7b7e
confirmation: Remove vestiges of the MitUser table.
...
The MitUser table was removed in df525ad
.
confirm_mituser.html could have been accessed through the last few lines of
confirmation/views.py:
templates.insert(0, 'confirmation/confirm_%s.html'
% (obj._meta.model_name,))
The commit message on df525ad
suggests there was another way
confirm_mituser.html could have been called, but I don't currently see
evidence for it in the code.
2017-07-07 18:53:00 -07:00
Rishi Gupta
8fed9eeb75
confirmation: Make host a required argument in get_link_for_object.
...
Removes some lines of test from test_email_change.py. The relevant code path
was never utilized by the code itself, just by the tests.
2017-07-07 18:53:00 -07:00
Rishi Gupta
c72a5f2efe
confirmation: Call get_link_for_object with host=unused when host unused.
2017-07-07 18:53:00 -07:00
Greg Price
207bf2e1fb
i18n: Recognize a little more Handlebars syntax in makemessages.
...
Usually we write translation expressions as `{{t ... }}`, but `{{ t ... }}`
is equally valid as far as Handlebars is concerned, and it matches how we
usually write simple variable substitutions, as `{{ ... }}`. So occasionally
someone writes `{{ t ... }}`; currently there are two examples of this
in the codebase, in `settings/bot-{settings,list-admin}.handlebars`.
Probably it'd be good to pick a style and enforce it uniformly, but
until we do, the other style shouldn't break translation.
2017-07-07 17:02:39 -07:00
Tim Abbott
3467a39cbd
RateLimitFilter: Fix issues with unicode exceptions.
...
If you call str() on an exception with unicode characters in it, that
will itself throw an exception.
2017-07-07 16:51:04 -07:00
Umair Khan
ee6e07d13f
message_sender: Use response_data variable.
...
response_data already contains the result of ujson.loads.
2017-07-07 16:33:36 -07:00
Umair Khan
0e8231d0f1
process_queue: Recover gracefully after PostgreSQL restart.
...
- For threaded workers:
Django's autoreloader catches SIGQUIT(3) to reload the program. If
a process being watched by autoreloader exits with status code 3,
reloader will restart the process. To reload, we send SIGUSR1(10)
signal from consumers to a handler in process_queue which then
exits with status code 3.
- For single worker per process:
Catch the SIGUSR1 and quit; supervisorctl will restart the worker
automatically.
Fixes #5512
2017-07-07 16:33:15 -07:00
Vishnu Ks
8954c0c726
management: Use Realm.objects.get instead of get_realm.
...
The Realm.DoesNotExist exception will never be raised if we pass a
string_id as in that case zerver.models.get_realm function would be
used for fetching. realm.zerver.models.get_realm uses filter query
so the exception will not be raised even if there are no realm which
matches the query.
Tests added by tabbott.
2017-07-07 15:02:12 -07:00
Vaida
d5517bae36
Delete the old zulip.com "referrals" system.
...
This system hasn't been in active use for several years, and had some
problems with it's design. So it makes sense to just remove it to declutter
the codebase.
Fixes #5655 .
2017-07-07 14:59:18 -07:00
Vishnu Ks
92e7255217
page_params: Include password min length and quality.
...
The change password form http://localhost:9991/#settings/your-account
don't have data-min-length and data-min-quality attributes. The
account_settings.handlebar which has the change password form is
rendered client side. So we have to pass the value of min length
and quality in page params to set the data-min-length and
data-min-quality attributes.
2017-07-07 14:48:06 -07:00
Tim Abbott
61f0778296
events: Use property_types framework to deduplicate code.
...
This cuts another block of code that we needed to add for every new user
setting.
2017-07-07 14:26:44 -07:00
Tim Abbott
dbabe3fd37
add_users_to_streams: Fix check for all_users option.
2017-07-07 13:57:57 -07:00
Tim Abbott
982667acf5
management: Add new library for specifying realms.
...
This new library is intended to make it easy for management commands
to access a realm or a user in a realm without having to duplicate any
of the annoying parsing/extraction code.
2017-07-07 13:57:57 -07:00
Tim Abbott
05c190a97c
Fix new-login emails for iOS not identifying OS correctly.
...
Previously, we were only checking for common strings in iOS browsers,
not for the explicit string that we use with the Zulip app.
2017-07-07 13:34:25 -07:00
Tim Abbott
761379bf9b
events: Clean up unnecessary realm_mandatory_topics code.
2017-07-07 11:11:44 -07:00
neiljp (Neil Pilgrim)
f1a8148242
mypy: Set remote_username parameter to Optional[Text] based on a test.
2017-07-07 10:56:33 -07:00
neiljp (Neil Pilgrim)
a84d7b8581
mypy: Specify type of 'user_profile = None' as Optional[UserProfile].
2017-07-07 10:56:33 -07:00
neiljp (Neil Pilgrim)
0958298d88
mypy: Add missing type parameter in test_upload.py:create_user.
2017-07-07 10:56:33 -07:00
neiljp (Neil Pilgrim)
6cb3a2ab1a
mypy: Move type annotation in jira/view.py before general comments.
2017-07-07 10:56:33 -07:00
neiljp (Neil Pilgrim)
db0b985e82
mypy: Use specific kwargs types.
2017-07-07 10:56:33 -07:00
Tim Abbott
d6e0960ca2
push_notifications: Fix mypy annotation logic around push tokens.
...
I'm not 100% confident this is long-term correct, but at least it's
consistent.
2017-07-07 10:54:37 -07:00
Vishnu Ks
c5f75a8f3d
test_classes: Remove client_put_multipart function.
...
We are no longer using this method anywhere. Removing this
is essential for making the backend coverage tests to pass.
2017-07-07 10:31:43 -07:00
Vishnu Ks
9067890120
urls: Use POST for zerver.views.user_settings.set_avatar_backend.
...
The set_avatar_backend is changed from PUT to POST becuase this
is not idempotent.
2017-07-07 10:31:43 -07:00
Vishnu Ks
df5df76961
urls: Use POST for zerver.views.realm_emoji.upload_emoji.
...
The upload_emoji endpoint is changed from PUT to POST because
this endpoint is not idempotent.
2017-07-07 10:31:43 -07:00
Vishnu Ks
cf2dec539f
urls: Use POST for zerver.views.realm_icon.upload_icon.
...
This upload_icon endpoint is changed from PUT to POST becuase
this endpoint is not idempotent.
2017-07-07 10:31:43 -07:00
Tim Abbott
0606ba88df
push_notifications: Verify that token types are valid.
...
We only have two types of push notification tokens, so we should
validate that in the bouncer code path.
2017-07-07 10:28:36 -07:00
Tim Abbott
eaa33cce73
push_notifications: Validate format of APNS tokens.
...
This fixes a bug where we would previously not validate the format of
APNS tokens before writing them to the database, which could lead to
exceptions in the push notifications system if a buggy mobile app
submitted invalid format tokens.
2017-07-07 10:28:36 -07:00
Tim Abbott
73b05cdbb2
actions: Fix logging issue with unicode in check_message errors.
...
This doesn't fix the root problem, but it means we'll get a more
correct traceback when future problems happen.
2017-07-06 16:22:13 -07:00
Jack Zhang
37a80d5cc4
portico: Redesign and rewrite /integrations text headings.
2017-07-06 15:28:50 -07:00
Tim Abbott
afa8c8259c
integrations: Eliminate analytics category.
2017-07-06 15:28:50 -07:00
Tim Abbott
194f03cb77
integrations: Update the categorization.
2017-07-06 15:23:39 -07:00
Tim Abbott
b32dfd99fd
integrations: Fix configuration for phabricator.
2017-07-06 15:16:14 -07:00
Tim Abbott
e85aafdb8b
integrations: Add initial categories to our integrations page.
2017-07-06 13:04:43 -07:00
Jack Zhang
cb3e930159
integrations: Extend integrations classes with categories.
...
For now, all integrations are temporarily under the category
'analytics'. Real categorizations should be added prior to
deployment.
2017-07-06 13:04:43 -07:00
Steve Howell
155f3d42c8
test: Fix test_i18n.test_json_error().
...
The refer_friend endpoint is about to be deprecated, so we
test with invite_users instead, and I tried to make the
dummy value returned by the mocked gettext function a little
more clear.
2017-07-06 11:30:55 -04:00
Umair Khan
638b32542d
auth: Don't show deactivation notice to mirror dummies.
2017-07-05 23:50:53 -07:00
Rishi Gupta
a26703109e
settings: Change all uses of ZULIP_ADMINISTRATOR to FromAddress.SUPPORT.
...
Make it less likely that further development will break compatibility with
ZULIP_ADMINISTRATORs of the form "name <email>".
Note that the suggested value for this setting has been
'zulip-admin@example.com' for a while, so hopefully this commit causes no
change for most installations.
2017-07-05 15:33:01 -07:00
Rishi Gupta
1291ac9eff
emails: Groundwork to personalize reply-to name of missed message emails.
2017-07-05 15:33:01 -07:00