Go to file
Mateusz Mandera 586a5facc9 models: Add is_realm_admin and is_guest setters.
Fixes #13452.

The migration from UserProfile.is_realm_admin/UserProfile.is_guest in
e10361a832 broke our LDAP-based support
for setting a user's role via LDAP properties, which relied on setting
those fields.  Because the django-auth-ldap feature powering that only
supports booleans (and in any case, we don't want to expose constants
like `ROLE_REALM_ADMINISTRATOR` to the LDAP configuration interface),
it makes sense to provide setters for these legacy fields for
backwards-compatibility.

We lint against using these setters directly in Zulip's codebase
directly.  The issue with using these is that when changing user's
.role we want to create appropriate RealmAuditLog entries and send
events. This isn't possible when using these setters - the log entries
and events should be created if the role change in the UserProfile is
actually save()-ed to the database - and on the level of the setter
function, it's not known whether the change will indeed be saved.

It would have to be somehow figured out on the level of post_save
signal handlers, but it doesn't seem like a good design to have such
complexity there, for the sake of setters that generally shouldn't be
used anyway - because we prefer the do_change_is_* functions.

The purpose of this change is narrowly to handle use cases like the
setattr on these boolean properties.
2019-12-09 11:54:01 -08:00
.circleci circleci: Store XUnit test results. 2019-07-07 22:31:11 -07:00
.github github: Suggest GIFs too in PR template. 2018-02-16 09:59:22 -08:00
.tx cleanup: Delete trailing newlines. 2019-08-06 23:29:11 -07:00
analytics support: Send confirmation email on realm activation. 2019-12-02 09:51:45 -08:00
confirmation confirmation: Set confirmation object realm attribute in realm reactivation. 2019-10-21 16:52:46 -07:00
corporate corporate: Consistently use delivery_email for billing. 2019-11-18 17:02:57 -08:00
docs docs: Explain commit summary example explicitly. 2019-12-06 11:39:40 -08:00
frontend_tests markdown: Remove redundant checks from /me. 2019-12-03 17:17:10 -08:00
locale i18n: Update translation data from Transifex. 2019-11-22 15:33:36 -08:00
pgroonga migrations: Remove unused imports. 2019-02-02 17:01:04 -08:00
puppet mypy: Upgrade from 0.730 to 0.740. 2019-11-13 12:38:45 -08:00
requirements auth: Use zxcvbn to ensure password strength on server side. 2019-11-21 10:23:37 -08:00
scripts scripts: Move inline-email-css from tools to scripts. 2019-11-15 17:39:42 -08:00
static bot settings: Fix sorting by owner. 2019-12-06 12:01:46 -08:00
stubs mypy: Remove daemon mode. 2019-08-25 15:04:12 -07:00
templates docs: Explain link sharing in /api/upload-file. 2019-12-02 12:01:46 -08:00
tools models: Add is_realm_admin and is_guest setters. 2019-12-09 11:54:01 -08:00
zerver models: Add is_realm_admin and is_guest setters. 2019-12-09 11:54:01 -08:00
zilencer push_notifications: Clear PushDeviceToken on API key change. 2019-11-19 15:37:43 -08:00
zproject ldap: Fix error while updating a user registered in multiple realms. 2019-11-21 11:13:31 -08:00
zthumbor zthumbor: Clean up type ignores. 2019-08-09 17:42:33 -07:00
.browserslistrc webpack: Transpile JS code with Babel. 2019-07-22 17:55:32 -07:00
.codecov.yml codecov: Change threshold to use percentage syntax. 2019-07-20 14:37:04 -07:00
.editorconfig editorconfig: Set JS max_line_length = 100, to match eslintrc. 2019-10-14 17:32:38 -07:00
.eslintignore blueslip: Apply ESLint. 2019-11-01 12:13:59 -07:00
.eslintrc.json js: Automatically convert var to let and const in remaining files. 2019-11-20 23:04:01 -08:00
.gitattributes Revert "gitattributes: Mark yarn.lock as "binary", i.e. suppress diffs." 2019-05-20 19:31:14 -07:00
.gitignore i18n: Move static/locale back to locale. 2019-07-02 14:57:55 -07:00
.gitlint lint: Allow revert commit messages in gitlint. 2018-02-13 09:21:01 -08:00
.isort.cfg tornado: Fix logging of tornado activity level. 2018-04-17 15:59:01 -07:00
.npmignore Add proxy notes to new README.dev.md troubleshooting section. 2016-03-29 21:54:05 -07:00
.stylelintrc lint: Ban color names in CSS. 2019-01-22 15:33:18 -08:00
.travis.yml ci: Move backend and production tests to Ubuntu 16.04 (xenial). 2019-05-24 17:07:15 -07:00
.yarnrc .yarnrc: Set ignore-scripts true. 2019-08-28 16:15:54 -07:00
CODE_OF_CONDUCT.md docs: Add clarifying comma in CODE_OF_CONDUCT.md. 2019-04-05 18:01:37 -07:00
CONTRIBUTING.md docs: Update GSoC/GSoD ideas pages. 2019-10-29 16:07:10 -07:00
Dockerfile-postgresql search: Remove now unnecessary tsearch_extra dependency. 2019-08-29 12:49:26 -07:00
LICENSE license: Move license application notice from LICENSE to NOTICE. 2018-10-02 12:04:44 -07:00
NOTICE license: Move license application notice from LICENSE to NOTICE. 2018-10-02 12:04:44 -07:00
README.md README: Improve links to coverage/CI to point to master. 2019-10-01 15:31:55 -07:00
Vagrantfile Revert "vagrant: Add NFS backend for file synchronization for OSX." 2019-08-12 16:04:00 -07:00
babel.config.js babelrc: Replace with babel.config.js. 2019-10-17 16:48:23 -07:00
manage.py manage.py: Revert sabotaging pika.adapters.twisted_connection import. 2019-01-31 10:04:28 -08:00
mypy.ini settings: Turn on mypy checking. 2019-11-13 12:38:45 -08:00
package.json dependencies: Upgrade simplebar from 4.2.3 to 5.0.7. 2019-11-13 12:46:29 -08:00
postcss.config.js webpack: Move CSS minification to optimization stage. 2019-09-02 21:58:13 -07:00
tsconfig.json tsconfig: Fix typescript-eslint memory usage disaster. 2019-11-22 11:38:25 -08:00
version.py Release Zulip server 2.1.0-rc1. 2019-11-22 15:33:36 -08:00
yarn.lock dependencies: Upgrade simplebar from 4.2.3 to 5.0.7. 2019-11-13 12:46:29 -08:00

README.md

Zulip overview

Zulip is a powerful, open source group chat application that combines the immediacy of real-time chat with the productivity benefits of threaded conversations. Zulip is used by open source projects, Fortune 500 companies, large standards bodies, and others who need a real-time chat system that allows users to easily process hundreds or thousands of messages a day. With over 500 contributors merging over 500 commits a month, Zulip is also the largest and fastest growing open source group chat project.

CircleCI branch Coverage Status Mypy coverage GitHub release docs Zulip chat Twitter

Getting started

Click on the appropriate link below. If nothing seems to apply, join us on the Zulip community server and tell us what's up!

You might be interested in:

You may also be interested in reading our blog or following us on twitter. Zulip is distributed under the Apache 2.0 license.