mirror of
https://github.com/zulip/zulip.git
synced 2025-11-14 10:57:58 +00:00
migrations: Allow zulipinternal bots to delete their own messages.
This commit is contained in:
committed by
Tim Abbott
parent
8786d96fe9
commit
1f045bc794
@@ -33,6 +33,7 @@ def create_internal_realm() -> None:
|
|||||||
# is changed later before the transaction is committed.
|
# is changed later before the transaction is committed.
|
||||||
for permission_configuration in Realm.REALM_PERMISSION_GROUP_SETTINGS.values():
|
for permission_configuration in Realm.REALM_PERMISSION_GROUP_SETTINGS.values():
|
||||||
setattr(realm, permission_configuration.id_field_name, -1)
|
setattr(realm, permission_configuration.id_field_name, -1)
|
||||||
|
realm.delete_own_message_policy = 1
|
||||||
realm.save()
|
realm.save()
|
||||||
|
|
||||||
RealmAuditLog.objects.create(
|
RealmAuditLog.objects.create(
|
||||||
|
|||||||
13
zerver/migrations/0563_zulipinternal_can_delete.py
Normal file
13
zerver/migrations/0563_zulipinternal_can_delete.py
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
dependencies = [
|
||||||
|
("zerver", "0562_remove_realm_create_web_public_stream_policy"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RunSQL(
|
||||||
|
"UPDATE zerver_realm SET delete_own_message_policy = 1 where string_id = 'zulipinternal'"
|
||||||
|
)
|
||||||
|
]
|
||||||
Reference in New Issue
Block a user