Commit Graph

5148 Commits

Author SHA1 Message Date
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
James Rowan 388cef900e tests: Enforce that activation emails come from NOREPLY address. 2017-07-05 15:19:00 -07:00
James Rowan 0951666cbb emails: Confirmation emails should come from the NOREPLY address.
This prevents users from accidentally sending a confirmation link
specific to their account to their Zulip administrator if they reply
to the invitation, invitation reminder, account confirmation, or new
email confirmation emails.
2017-07-05 15:18:33 -07:00
Harshit Bansal 3c9705ce98 actions.py: Instead of deleting a realm emoji just deactivate it.
Instead of removing an emoji from the database, just mark them as
deactivated so that they can't be used further but can be rendered
properly in reactions and messages.

Fixes: #4750.
2017-07-05 13:00:15 -07:00
Vaida Plankyte 9461f490c8 event_queue.py: Use the singular 'they' pronoun. 2017-07-05 09:27:44 -07:00
Vaida Plankyte 0352ad517b streams.py: Use the singular 'they' pronoun. 2017-07-05 09:27:44 -07:00
Vaida Plankyte 5aee5b395a message.py: Use the singular 'they' pronoun. 2017-07-05 09:27:44 -07:00
Vaida Plankyte c88530366e user_settings.py: Use the singular 'they' pronoun. 2017-07-05 09:27:44 -07:00
Vaida Plankyte 8c4ee83980 decorator.py: Use the singular 'they' pronoun. 2017-07-05 09:27:43 -07:00
Vaida Plankyte d40f6da7f8 models.py: Use the singular 'they' pronoun. 2017-07-05 09:27:43 -07:00
James Rowan d88e7308bf emails: Add a FromAddress class to control access to certain settings emails.
No change in behavior.

Also makes the first step towards converting all uses of
settings.ZULIP_ADMINISTRATOR and settings.NOREPLY_EMAIL_ADDRESS to
FromAddress.*.

Once everything is converted, it will be easier to ensure that future
development doesn't break backwards compatibility with the old style of
settings emails.
2017-07-04 14:25:01 -07:00
James Rowan 368bd66d8b emails: Refactor send_email functions to take both a sender name and address.
This will allow for customized senders for emails, e.g. 'Zulip Digest' for
digest emails and 'Zulip Missed Messages' for missed message emails.

Also:
* Converts the sender name to always be "Zulip", if the from_email used to
  be settings.NOREPLY_EMAIL_ADDRESS or settings.ZULIP_ADMINISTRATOR.

* Changes the default value of settings.NOREPLY_EMAIL_ADDRESS in the
  prod_setting_template to no longer have a display name. The only use of
  that display name was in the email pathway.
2017-07-04 14:25:01 -07:00
Rishi Gupta a8af0b6d91 email_mirror: Change missed message noreply to not have a display name.
It's better to see "noreply@..." when replying to a message that you can't
reply to than "Zulip".
2017-07-04 14:25:01 -07:00
Rishi Gupta 364415bba4 password reset flow: Use default noreply email address. 2017-07-04 14:25:01 -07:00
Tim Abbott c2ee259987 settings: Simplify testing code for bool realm settings.
Now, when we add a new realm setting with the bool type, we don't need
to edit the tests at all.
2017-07-04 14:23:05 -07:00
Franziska von der Goltz 98847937f4 realm: add mandatory topic setting on org level.
Lets organizations require users to specify a topic the discussion.

Fixes: #5164.
2017-07-04 14:09:21 -07:00
Aditya Bansal caa8a3f7fc Make test_google_oauth2_token_failure() work without internet. 2017-07-04 12:45:27 -07:00
Tim Abbott 59d2eae946 signals: Fix browser reporting for new Electron logins.
Previously, we were checking for "Zulip" entries in User-Agent strings
at the very end of the list, not the beginning.  A Zulip User-Agent
should have priority, since it includes the User-Agent strings for a
lot of other browsers, and also it will always be the most specific
value.
2017-07-03 10:12:20 -07:00
Harshit Bansal 7387e6fe4b bugdown/__init__.py: Close opened file objects. 2017-07-01 11:14:24 -07:00
Harshit Bansal 4cb8ac100a emoji: Fix the title and alt text for unicode emojis.
Unicode emojis when rendered should display canonical short name.
Similarly, the alt text should be of the format `:<short_name>:`.
For both of these we currently display the actual unicode symbol.
As some systems don't have the fonts necessary for displaying them
properly, they are rendered as empty square blocks. This commit also
ensures that the markup generated for emoji generated by canonical
name and by an unicode emoji is same.

Fixes: #5555.
2017-07-01 11:14:24 -07:00
Rishi Gupta b55dce197d actions.py: Clear ScheduledJobs of users in do_deactivate_{user,realm}. 2017-07-01 08:44:47 -07:00
Pweaver (Paul Weaver) 2c10e7c0db Change from and noreply emails to use EXTERNAL_HOST domain.
This eliminates another mandatory setting from what one needs to
configure to setup a Zulip server.
2017-07-01 08:09:25 -07:00
Kenji Okimoto 2eb6c49a89 github_webhook: Fix a typo to handle issues event properly.
issue -> issues in the HTTP_X_GITHUB_EVENT.
2017-06-30 10:55:01 -07:00
Greg Price 7b526b3946 narrow: Add comments explaining how we limit to legitimately-visible results.
Two wrinkles here:

* It's actually a little subtle why `ok_to_include_history` is
  correct; in particular, it's not true that a term `stream:foo` will
  always limit the query to the stream `foo`.  For this, add an
  explanatory comment backed up by an assert.

* The TODO comment in `messages_in_narrow_backend` about assuming this
  is a search, I'm pretty sure doesn't matter; it seems to only be
  saying that we return the set of fields we would for a search.
  They're harmless to send, and in any case it doesn't appear to be
  true anymore that the client only calls this for a search: the
  `can_apply_locally` function also causes narrows with `has:` to go
  to the server.  So just take that comment out.
2017-06-30 11:47:40 -04:00
Greg Price 7785a1046b narrow: Describe the key security invariant of NarrowBuilder.
(After writing the term "invariant" a few times in these comments and
now this commit message, my inner mathematician reminds me that this
property is properly termed a "monovariant" -- something does change,
but it changes only in one direction.  Pretty sure saying "invariant"
communicates better here, though.)
2017-06-30 11:47:40 -04:00
Sadjad Fouladi 92fefa0e7e Fix a grammatical error in status change message. 2017-06-30 11:44:04 -04:00
Rishi Gupta 577e201df0 emails: Replace DEFAULT_FROM_EMAIL with ZULIP_ADMINISTRATOR.
We're getting rid of DEFAULT_FROM_EMAIL from prod_settings_template, since
we only really need one of {DEFAULT_FROM_EMAIL, ZULIP_ADMINISTRATOR}.
2017-06-29 17:54:33 -07:00
Rishi Gupta 36cd122905 models: Change default org_type to CORPORATE.
Once we implement org_type-specific features, it'll be easy to change a
corporate realm to a community realm, but hard to go the other way. The main
difference (the main thing that makes migrating from a community realm to a
corporate realm hard) is that you'd have to make everyone sign another terms
of service.
2017-06-29 15:14:58 -07:00
Harshit Bansal fc6eedb831 bugdown: Make `unicode_emoji_regex` global. 2017-06-29 13:26:07 -07:00
Rishi Gupta 81220e050b context_processors: Remove zulip_admin from zulip_default_context.
There is no real distinction between zulip_admin and support_email in the
codebase, so fold them into a single variable.
2017-06-29 11:20:32 -07:00
Rishi Gupta bf996f91ba deactivated.html: Use support_email instead of custom context variable. 2017-06-29 11:20:32 -07:00
Rishi Gupta 78790ce825 send_password_reset_email: Remove spurious send_mail import.
Make grepping for and otherwise understanding our email pathways slightly
easier.
2017-06-29 10:51:12 -07:00
vaibhav 7f9b4d3a94 Outgoing Webhook System: Add usage of Interfaces in DoRestCall. 2017-06-28 11:11:21 -04:00
vaibhav a60552930e Outgoing Webhook System: Add base interface class and Generic class. 2017-06-28 11:11:21 -04:00
Yago González 2f4091b38d api: Fix caps in JSON validation error message. 2017-06-27 08:33:56 -04:00
Umair Khan acf0aad4a2 signals.py: Bring coverage to 100%. 2017-06-26 16:14:14 -07:00
Umair Khan 6357737978 get_device_browser: Fix Opera detection.
Starting from version 15, Opera uses 'OPR/' in its user agent string.
We need to move Opera detection before Chrome detection because
Opera's user agent string satisfies Chrome conditions as well.
Ref: https://dev.opera.com/blog/opera-user-agent-strings-opera-15-and-beyond/
2017-06-26 16:14:14 -07:00
Umair Khan 14402b0b97 get_device_browser: Move Edge detection to the top.
The user agent strings of Edge satisfy Chrome condition as well.
Ref: https://msdn.microsoft.com/en-us/library/hh869301(v=vs.85).aspx
2017-06-26 16:14:14 -07:00
Umair Khan dc78a7888f login_or_register_remote_user: Send login emails for mobile.
Fixes #5389
2017-06-26 16:14:14 -07:00
Umair Khan 34a91be9a2 api_fetch_api_key: Send new login emails for mobile. 2017-06-26 16:14:14 -07:00
Umair Khan 7e43cd5624 get_device_browser: Fix browser string for mobile.
Now get_device_browser() returns 'Zulip' for 'ZulipAndroid' and
'ZulipMobile'.
2017-06-26 16:14:14 -07:00
Umair Khan b9c69004e4 google_oauth2_test: Pass headers in all requests.
Currently we only pass headers in the first client_get call but
sometimes the effective request which reaches the view is through
a later call to the client_get in this function. Due to which
headers are not passed.
2017-06-26 16:14:14 -07:00
Greg Price 058d76f5ff avatar_hash: Update a comment to reflect the current code.
Also move a couple of comments inside the functions they describe,
because they're about the implementation of the functions rather
than their interface.
2017-06-26 15:15:32 -07:00
Eeshan Garg 708f3a4bb1 lib/integrations: Stop rendering HTML files.
Now that all of our integrations/webhooks docs have been migrated
to Markdown, we no longer need to render HTML.
2017-06-26 12:30:04 -04:00
Eeshan Garg 4ad951f256 integrations/perforce: Migrate docs to Markdown. 2017-06-26 12:30:04 -04:00
Eeshan Garg ed388ed320 integrations/redmine: Migrate docs to Markdown. 2017-06-26 12:30:04 -04:00
Eeshan Garg 53c1a53120 integrations/jenkins: Migrate docs to Markdown. 2017-06-26 12:30:04 -04:00
Eeshan Garg 9115be0e9e integrations/trello-plugin: Migrate docs to Markdown. 2017-06-26 12:30:04 -04:00
Eeshan Garg c17600e3be integrations/rss: Migrate docs to Markdown. 2017-06-26 12:30:04 -04:00
Eeshan Garg 421c71919c integrations/mercurial: Use create-stream macro. 2017-06-26 12:30:04 -04:00
Eeshan Garg 9dde906115 integrations/git: Use macros and improve Markdown. 2017-06-26 12:30:04 -04:00
Eeshan Garg b60c95d971 integrations/svn: Use Markdown macros. 2017-06-26 12:30:04 -04:00
Eeshan Garg b9ac92c1a0 integrations/openshift: Use Markdown macros. 2017-06-26 12:30:04 -04:00
Eeshan Garg 31fa2f7c6d integrations/hubot: Migrate docs to Markdown. 2017-06-26 12:30:04 -04:00
Eeshan Garg 3eeb90c599 integrations/puppet: Migrate docs to Markdown. 2017-06-26 12:30:04 -04:00
Eeshan Garg fc0d7ed882 integrations/phabricator: Migrate docs to Markdown. 2017-06-26 12:30:04 -04:00
Eeshan Garg 169d7393a6 jira-plugin: Use create-stream macro and improve Markdown. 2017-06-26 12:30:04 -04:00
Eeshan Garg 70448a9c65 integrations/email: Migrate docs to Markdown. 2017-06-26 12:30:04 -04:00
Eeshan Garg 5fa71a4369 integrations/asana: Migrate docs to Markdown. 2017-06-26 12:30:04 -04:00
Eeshan Garg 843dbbf3a1 webhooks/slack: Restructure docs to use create-stream.md macro. 2017-06-26 12:30:04 -04:00
Abhijeet Kaur cf0040c402 bots: De-duplicate removing at-mention pattern for calling bots.
Similar code appeared at two places (the code is meant to remove the
leading @-mention before passing the remainder of the message to the
bot handler)—both 'zerver/worker/queue_processors.py' and
'api/bots_api/bot_lib.py'.

Remove function from the queue_processors.py file and let the entire message
be processed (includes removing of @-mention) at bot_lib.py.
2017-06-26 08:33:25 -04:00
Nick Sweeting 8e84c72acb Add error checking to payload['previous'] for Circle.CI.
This webhook used to fail if there was no previous payload.
2017-06-26 08:15:07 -04:00
Rishi Gupta a56d703bdc i18n: Remove translation tags in management commands. 2017-06-25 11:28:28 -04:00
Vishnu Ks 00668c7bbd registration.py: Send pms from welcome-bot on user creation. 2017-06-25 11:23:45 -04:00
Vishnu Ks 9b7585a436 bots: Make welcome-bot cross realm. 2017-06-25 11:23:45 -04:00
Vishnu Ks 50008fe309 actions.py: Create internal_send_private_message function. 2017-06-25 11:23:45 -04:00
Umair Khan a21f2d7715 migrations: Transition to new squashed migration. 2017-06-23 08:40:57 -04:00
Umair Khan cec78e23bc migrations: Remove squashed migration files. 2017-06-23 08:40:57 -04:00
Umair Khan 6fbddf578a migrations: Squash migrations from 0001 to 0028. 2017-06-23 08:40:57 -04:00
Greg Price 5f74dc86a9 models: Clarify a bit the comment explaining UserMessage. 2017-06-22 17:10:42 -07:00
Greg Price 4a652ded0b models: Remove a scary but obsolete comment.
This field was apparently never used, perhaps because we
reread this comment and anticipated how much future pain
it was warning us to avoid. :)  See commit 2de31ee28,
which deleted it.
2017-06-22 17:10:42 -07:00
Greg Price c9e35c459a landing: Write up why open source projects should use Zulip
This isn't very slick, but it should get the main points down,
and it's past time we got something like this up.  Definitely
needs in the future another pass at the text, and also some images
(screenshots, etc.) and styling.
2017-06-22 16:26:50 -07:00
Vishnu Ks 61744a7a2a forms.py: Replace hardcoded UserProfile.MAX_NAME_LENGTH in RegistrationForm. 2017-06-22 12:45:46 -07:00
Vaida Plankyte 1fb8eb823a test_emails.py: Add referrer_realm_name to test values. 2017-06-22 14:19:33 -04:00
Sarah 205d523ab2 test_events: Refactor to use do_set_user_display_settings_test.
Remove individual setting tests and replace with
test_set_user_display_settings.
2017-06-22 08:00:56 -04:00
sinwar 8ff2e5a22b requirements: Upgrade moto to latest version.
Fixes #5454
2017-06-21 19:05:50 -04:00
Abhijeet Kaur c42d935be8 bots: Move "EmbeddedBotHandler" class to "zerver/lib/bot_lib.py" file.
This would keep embedded classes for zulip at one place, that is, in
"zerver" directory. This also fixes break in PyPI package for bindings.
2017-06-21 16:01:16 -04:00
James Rowan 19ffb84ac2 Make notification email for new login give browser and os.
notify_new_login.subject: include browser and os in subject line.
test_new_users: test for subject line to include browser/os.
2017-06-21 14:36:41 -04:00
Abhijeet Kaur a45c224fda bots: Update EmbeddedBotWorker class in queue_processors.py.
Update EmbeddedBotWorker.get_bot_api_client in
'zerver/workers/queue_processors.py' to return an EmbeddedBotHandler
object instead of ExternalBotHandler object.

This change is as a followup for splitting the BotHandler class into
two separate classes for external and embedded bots.
2017-06-21 10:22:53 -04:00
Abhijeet Kaur 68777e93a0 bots: Rename BotHandlerApi class to ExternalBotHandler.
This change is done for better understanding of the class functionality
from its class name. Now there will be 3 different classes for bots,
namely 'ExternalBotHandler', 'FlaskBotHandler' and  'EmbeddedBotHandler'.
2017-06-21 10:22:53 -04:00
Umair Khan a4afca7b73 ldap: Don't authenticate if realm is None.
Fixes #5431
2017-06-21 10:14:34 -04:00
Umair Khan 005037830c test_auth_backends: Fix indentation. 2017-06-21 10:14:34 -04:00
Sampriti Panda 5dc053d6fb bots: Add validation to add_bot_backend to prevent empty short names
Fixes #5487
2017-06-21 10:11:08 -04:00
Abhijeet Kaur 14fdc2aea6 bots: Add 'Bot type' column to bots list in organization settings. 2017-06-20 23:04:46 -04:00
Cory Lynch 00ebb4f4d4 messages.py: Ignore own email in group PMs. 2017-06-20 21:22:45 -04:00
Umair Khan 4f223c19d8 sign-in: Show proper error for deactivated user.
Show a clear error message when a user tries to sign in with
a deactivated account.

Fixes #4757
2017-06-20 11:38:58 -04:00
Sampriti Panda c36c3ae20b bots: Change bot_type to DEFAULT_BOT for bots with None bot_type
Fixes #5440
2017-06-20 11:34:40 -04:00
Harshit Bansal dfbf8b8086 bugdown: Remove shortname mention syntax.
We used shortnames for mentioning users before we had autocomplete
feature. Since we now have autocomplete typeahead, this syntax is
no more useful and just causes problems. This commit removes the
shortname mention syntax.

Fixes: #4189.
2017-06-19 16:57:59 -04:00
Jack Zhang af3b7d4c98 message-edit: Patch html tags after edits on new lines. 2017-06-19 16:43:11 -04:00
vaibhav 33c0c00cd6 Outgoing webhook System: first Iteration of outgoing webhook UI. 2017-06-19 16:05:54 -04:00
Aditya Bansal f32c1892ff preview.py: Fix error raised on uploading file with unicode filename. 2017-06-19 14:58:44 -04:00
Cory Lynch 552c39a036 fenced_code.py: Improve test coverage for special chars. 2017-06-19 06:53:25 -04:00
Cory Lynch 6255636923 Support special characters for code block languages.
Fixes #5412
2017-06-19 06:53:25 -04:00
Cory Lynch b4419528f7 Update narrow.py, messages.py to support is:unread. 2017-06-19 06:51:13 -04:00
vaibhav 42af09663d validators: Add check_url validator.
This just uses Django's existing validator, and reformats its
interface to work with has_request_variables.
2017-06-15 15:03:26 -07:00
Tim Abbott 0904d61e96 integrations: Remove compatibility code for HTML format docs.
This fixes a coverage error in Travis CI caused by this code no longer
being used.
2017-06-15 12:34:46 -07:00
Rohitt Vashishtha c802967808 webhooks/travis: Fix typos in docs. 2017-06-15 11:11:56 -07:00
Rohitt Vashishtha d671dea29f webhooks/yo: Migrate docs to markdown. 2017-06-15 11:10:44 -07:00
Rohitt Vashishtha 1fe58eb325 webhooks/slack: Migrate docs to markdown. 2017-06-15 11:10:44 -07:00
Tim Abbott 93ea4128ac auth: Require the realm_name field in RegistrationForm.
Previously, the only required field in RegistrationForm was the full
name (and possibly ToS, depending on settings).  This meant that if
LDAP was configured, realm creation would break, because the form
would be valid the first time one landed on it, before the user even
filled it out!

The correct fix is to make the extra fields required in
RegistrationForm in the event that we're doing realm creation.

It's possible that a cleaner fix would be to use a subclass.

With a test from Umair Waheed Khan.

Fixes #5387.
2017-06-15 11:04:25 -07:00
Tim Abbott 57d26c1a66 auth: Add realm_creation parameter to RegistrationForm. 2017-06-15 11:04:25 -07:00
Umair Khan 2e1ccabb88 forms.py: Add the dynamic field in __init__
If we add the field like this, we can control its existence in tests.
In other case, since classes are compiled once, even if we set
TERMS_OF_SERVICE to False in tests, terms field would still continue
to exist in the form class.
2017-06-15 10:14:55 -07:00
Abhijeet Kaur af7e08acb0 bots: Add UI to view bot types of existing bots in "Your bots".
Tweaked by tabbott for more standard internationalization.
2017-06-15 10:08:31 -07:00
kunall17 d8310724b6 Use absolute URLs in GCM push notifications.
This will eventually allow us to simplify the logic required for the
mobile apps processing GCM notifications.
2017-06-15 03:56:59 -07:00
Harshit Bansal 7950f82f27 realm_emoji: Make sure that a deactivated realm emoji can't be used.
A deactivated realm emoji should neither be accepted further as a
reaction nor its further occurences in a message be rendered as an
emoji. However, all the old occurences should continue to render
normally.
2017-06-15 02:59:57 -07:00
Harshit Bansal 8db2cf8d7c models.py: Add `deactivated` field to the emoji dicts.
Add `deactivated` field to the realm emoji dicts returned from the
`get_realm_emojis_uncached()` function.
2017-06-15 02:59:57 -07:00
Harshit Bansal e85c11a461 models: Add `deactivated` field to RealmEmoji model.
Instead of deleting the emojis we will just mark them as `deactivated`.
This will prevent their further use but at the same time they will be
displayed properly in the reactions and messages in which they are used.
This field will be used as a flag to indicate whether the realm emoji
has been deleted or not.

Includes a database migration.
2017-06-15 02:59:57 -07:00
Tim Abbott 1043cd7a2b docs: Fix tests for error pages.
Without the trailing /, these return a 30x error.
2017-06-14 21:21:36 -07:00
Cory Lynch 78de70688e dev: Add URL to preview error 404/5xx pages. 2017-06-14 21:18:45 -07:00
Cory Lynch cb4dadfdcd tools: Create /devtools page for useful dev URLs.
Fixes #5179.
2017-06-14 20:17:56 -07:00
Eeshan Garg 2344e26b1a webhooks/zendesk: Migrate docs to Markdown. 2017-06-14 17:42:17 -07:00
Eeshan Garg 9e77749bfc webhooks/wordpress: Migrate docs to Markdown.
Markdown doesn't support tables, so I used an unordered list
instead for the HTML table at the end.
2017-06-14 17:42:17 -07:00
Eeshan Garg 4a3137be97 webhooks/taiga: Migrate docs to Markdown. 2017-06-14 17:42:17 -07:00
Eeshan Garg 1c5d0bb0fa webhooks/semaphore: Use append-stream-name.md macro. 2017-06-14 17:42:17 -07:00
Eeshan Garg 0d611d4c8a webhooks/stripe: Migrate docs to Markdown. 2017-06-14 17:42:17 -07:00
Harshit Bansal 0e25634934 views/alert_words.py: Use `do_add_alert_words()` in `add_alert_words()`.
Revert to the use of `do_add_alert_words()` in `add_alert_words()`
instead of `do_set_alert_words()` since it is used for serving a
PUT request. This change seems to be mistakenly done in commit
`d564a76f8e45b24cd2c66475ef7693582fb2f5fc'.
2017-06-13 16:36:11 -07:00
Aditya Bansal 914ab1040d integrations/codebase.html: Migrate to Markdown. 2017-06-13 16:32:00 -07:00
Eeshan Garg f1c209b38d lib/integrations: Stop passing kwargs as positional args to super. 2017-06-13 15:33:22 -07:00
Eeshan Garg b741f45408 webhooks/splunk: Migrate docs to Markdown. 2017-06-13 15:33:22 -07:00
Eeshan Garg df28bb40f2 webhooks/sentry: Migrate docs to Markdown. 2017-06-13 15:33:22 -07:00
Eeshan Garg 84da473da5 webhooks/semaphore: Migrate docs to Markdown. 2017-06-13 15:33:22 -07:00