-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ [#65] Add functionality to make users superuser based on groups
issue: #65
- Loading branch information
Showing
4 changed files
with
63 additions
and
0 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
32 changes: 32 additions & 0 deletions
32
mozilla_django_oidc_db/migrations/0012_openidconnectconfig_superuser_group_names.py
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,32 @@ | ||
# Generated by Django 3.2.18 on 2023-12-21 11:59 | ||
|
||
from django.db import migrations, models | ||
|
||
import django_better_admin_arrayfield.models.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
( | ||
"mozilla_django_oidc_db", | ||
"0011_alter_openidconnectconfig_userinfo_claims_source", | ||
), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="openidconnectconfig", | ||
name="superuser_group_names", | ||
field=django_better_admin_arrayfield.models.fields.ArrayField( | ||
base_field=models.CharField( | ||
max_length=50, verbose_name="Superuser group name" | ||
), | ||
blank=True, | ||
default=list, | ||
help_text="If any of these group names are present in the claims upon login, the user will be marked as a superuser. If none of these groups are present the user will lose superuser permissions.", | ||
size=None, | ||
verbose_name="Superuser group names", | ||
), | ||
), | ||
] |
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