Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3210 from modoboa/fix/missing_perm_view_domainalias
Added missing permission view_domainalias to DomainAdmins group
- Loading branch information
Showing
7 changed files
with
84 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Generated by Django 4.2.11 on 2024-03-20 10:37 | ||
|
||
from django.db import migrations | ||
|
||
|
||
def set_missing_permission(apps, schema_editor): | ||
Permission = apps.get_model("auth", "Permission") | ||
Group = apps.get_model("auth", "Group") | ||
group = Group.objects.filter(name="DomainAdmins").first() | ||
if not group: | ||
# Fresh install, nothing to do | ||
return | ||
perm = Permission.objects.get(codename="view_domainalias") | ||
group.permissions.add(perm) | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("admin", "0022_alter_alarm_domain"), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython(set_missing_permission, migrations.RunPython.noop), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Generated by Django 4.2.11 on 2024-03-20 11:11 | ||
|
||
from django.db import migrations, models | ||
import modoboa.core.models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("core", "0026_alter_localconfig__parameters_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="user", | ||
name="language", | ||
field=models.CharField( | ||
choices=[ | ||
("br", "breton"), | ||
("cs", "čeština"), | ||
("de", "deutsch"), | ||
("en", "english"), | ||
("el", "ελληνικά"), | ||
("es", "español"), | ||
("fi", "Suomalainen"), | ||
("fr", "français"), | ||
("it", "italiano"), | ||
("ja", "日本の"), | ||
("nl", "nederlands"), | ||
("pt", "português"), | ||
("pt-br", "português (BR)"), | ||
("pl", "polski"), | ||
("ro", "Română"), | ||
("ru", "русский"), | ||
("sv", "svenska"), | ||
("tr", "türk"), | ||
("zh-hant", "中文(台灣)"), | ||
], | ||
default=modoboa.core.models.get_default_language, | ||
help_text="Prefered language to display pages.", | ||
max_length=10, | ||
verbose_name="language", | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters