Projet

Général

Profil

0001-a2_rbac-use-a-TextField-to-store-role-name-59122.patch

Valentin Deniaud, 08 décembre 2021 15:53

Télécharger (2,13 ko)

Voir les différences:

Subject: [PATCH] a2_rbac: use a TextField to store role name (#59122)

 .../migrations/0026_auto_20211208_1031.py      | 18 ++++++++++++++++++
 src/authentic2/a2_rbac/models.py               |  1 +
 src/authentic2/manager/forms.py                |  3 +++
 3 files changed, 22 insertions(+)
 create mode 100644 src/authentic2/a2_rbac/migrations/0026_auto_20211208_1031.py
src/authentic2/a2_rbac/migrations/0026_auto_20211208_1031.py
1
# Generated by Django 2.2.19 on 2021-12-08 09:31
2

  
3
from django.db import migrations, models
4

  
5

  
6
class Migration(migrations.Migration):
7

  
8
    dependencies = [
9
        ('a2_rbac', '0025_auto_20210622_1132'),
10
    ]
11

  
12
    operations = [
13
        migrations.AlterField(
14
            model_name='role',
15
            name='name',
16
            field=models.TextField(verbose_name='name'),
17
        ),
18
    ]
src/authentic2/a2_rbac/models.py
206 206

  
207 207

  
208 208
class Role(RoleAbstractBase):
209
    name = models.TextField(verbose_name=_('name'))
209 210
    admin_scope_ct = models.ForeignKey(
210 211
        to='contenttypes.ContentType',
211 212
        null=True,
src/authentic2/manager/forms.py
612 612
    class Meta:
613 613
        model = Role
614 614
        fields = ('name', 'slug', 'ou', 'description')
615
        widgets = {
616
            'name': forms.TextInput(),
617
        }
615 618

  
616 619

  
617 620
class OUEditForm(SlugMixin, CssClass, forms.ModelForm):
618
-