ColeBurch
60225591dc
settings: Reorder custom profile field types.
...
This commit alphabetizes the custom profile field types in the
settings UI.
Fixes #28511 .
2024-01-21 12:51:53 -08:00
ColeBurch
9917ffa220
settings: Rename four custom profile fields types.
...
This commit renames four custom profile fields types.
Fixes part of #28511 .
2024-01-21 12:51:53 -08:00
Prakhar Pratyush
1eef052bd1
actions: Rename *topic local variables to *topic_name.
...
This is preparatory work towards adding a Topic model.
We plan to use the local variable name as 'topic' for
the Topic model objects.
Currently, we use *topic as the local variable name for
topic names.
We rename local variables of the form *topic to *topic_name
so that we don't need to think about type collisions in
individual code paths where we might want to talk about both
Topic objects and strings for the topic name.
2024-01-15 09:40:43 -08:00
Lauryn Menard
f27b6d896a
audit-logs: Add generic property changed for Customer and CustomerPlan.
...
Change audit logs for changing a Customer or CustomerPlan property
to use a generic event type and specify the property name in the
extra data.
2024-01-15 03:10:04 -08:00
Alex Vandiver
7720d362ba
messages: Only lock UserMessage rows, not other joined tables.
...
By default, `SELECT FOR UPDATE` will also lock any rows which are
`JOIN`ed into the selected rows; in the case of UserMessage rows, this
can mean arbitrary Message rows.
Since the messages themselves are not being changed, it is not
necessary to lock them -- and doing so may lead to deadlocks, in the
case that the UserMessage row is locked for update before the Message,
and some other request has already taken a read lock on the Message
and is blocked on the UserMessage write lock.
Change `select_for_update_query` to explicitly only lock UserMessage.
2024-01-09 13:13:59 -08:00
Lauryn Menard
2994685399
support: Add admin support for updating end date of active plan.
...
This currently will only apply to tier.SELF_HOSTED_LEGACY plans.
2024-01-09 10:13:21 -08:00
Lauryn Menard
fb29a35262
support: Add updating minimum licenses requirement after discount.
...
Adds a support action for updating the minimum licenses on a
customer object once a default discount has also been set.
In the case that the current billing entity has a current active
plan or a scheduled upgrade to a new plan, then the minimum
licenses will not be updated.
2024-01-04 18:42:07 -08:00
Anders Kaseorg
b38f3d2472
models: Extract zerver.models.lookups.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Anders Kaseorg
c343d7c30e
models: Move query_for_ids to zerver.lib.query_helpers.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Anders Kaseorg
33d140c8dc
models: Extract zerver.models.alert_words.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Anders Kaseorg
1f1b2f9a68
models: Extract zerver.models.bots.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Anders Kaseorg
27c0b507af
models: Extract zerver.models.custom_profile_fields.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Anders Kaseorg
d5410b577a
models: Extract zerver.models.onboarding_steps.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Anders Kaseorg
68d3b9f629
models: Extract zerver.models.realm_audit_logs.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Anders Kaseorg
c9c819e1d7
models: Extract zerver.models.scheduled_jobs.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Anders Kaseorg
73e68050bb
models: Extract zerver.models.presence.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Anders Kaseorg
9fb577337b
models: Extract zerver.models.user_activity.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Anders Kaseorg
cff0b78771
models: Move some functions to zerver.lib.attachments.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Anders Kaseorg
09d0abfe70
models: Extract zerver.models.drafts.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Anders Kaseorg
b15999c799
models: Extract zerver.models.messages.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Anders Kaseorg
bac027962f
models: Extract zerver.models.clients.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Anders Kaseorg
2394b37fa3
models: Extract zerver.models.muted_users.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Anders Kaseorg
ea2ee61b4c
models: Extract zerver.models.user_topics.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Anders Kaseorg
4aa2d76bea
models: Extract zerver.models.streams.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Anders Kaseorg
5391ec99d9
models: Extract zerver.models.push_notifications.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Anders Kaseorg
927d7a9a60
models: Extract zerver.models.prereg_users.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Anders Kaseorg
51f1dc257d
models: Extract zerver.models.recipients.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Anders Kaseorg
3c11fd9466
models: Move some functions to zerver.lib.display_recipient.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Anders Kaseorg
33610c8782
models: Extract zerver.models.realm_playgrounds.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Anders Kaseorg
21ab3858a7
models: Extract zerver.models.linkifiers.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Anders Kaseorg
67fb485797
models: Extract zerver.models.realm_emoji.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Anders Kaseorg
cd96193768
models: Extract zerver.models.realms.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Anders Kaseorg
7001a0dfc0
models: Extract zerver.models.groups.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Anders Kaseorg
45bb8d2580
models: Extract zerver.models.users.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Anders Kaseorg
37a9c4501f
models: Extract zerver.models.constants.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Anders Kaseorg
e601d0ae7c
models: Rename zerver/models.py to zerver/models/__init__.py.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00