mirror of
				https://gitlab.com/animath/si/plateforme.git
				synced 2025-11-04 09:02:11 +01:00 
			
		
		
		
	Permissions are strings, not integers
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
		@@ -1,4 +1,4 @@
 | 
			
		||||
# Generated by Django 5.0.3 on 2024-04-27 06:48
 | 
			
		||||
# Generated by Django 5.0.3 on 2024-04-27 07:00
 | 
			
		||||
 | 
			
		||||
import django.db.models.deletion
 | 
			
		||||
from django.conf import settings
 | 
			
		||||
@@ -30,7 +30,7 @@ class Migration(migrations.Migration):
 | 
			
		||||
                ("name", models.CharField(max_length=255, verbose_name="name")),
 | 
			
		||||
                (
 | 
			
		||||
                    "read_access",
 | 
			
		||||
                    models.PositiveSmallIntegerField(
 | 
			
		||||
                    models.CharField(
 | 
			
		||||
                        choices=[
 | 
			
		||||
                            ("anonymous", "Everyone, including anonymous users"),
 | 
			
		||||
                            ("authenticated", "Authenticated users"),
 | 
			
		||||
@@ -53,12 +53,13 @@ class Migration(migrations.Migration):
 | 
			
		||||
                            ),
 | 
			
		||||
                            ("admin", "Admin users"),
 | 
			
		||||
                        ],
 | 
			
		||||
                        max_length=16,
 | 
			
		||||
                        verbose_name="read permission",
 | 
			
		||||
                    ),
 | 
			
		||||
                ),
 | 
			
		||||
                (
 | 
			
		||||
                    "write_access",
 | 
			
		||||
                    models.PositiveSmallIntegerField(
 | 
			
		||||
                    models.CharField(
 | 
			
		||||
                        choices=[
 | 
			
		||||
                            ("anonymous", "Everyone, including anonymous users"),
 | 
			
		||||
                            ("authenticated", "Authenticated users"),
 | 
			
		||||
@@ -81,6 +82,7 @@ class Migration(migrations.Migration):
 | 
			
		||||
                            ),
 | 
			
		||||
                            ("admin", "Admin users"),
 | 
			
		||||
                        ],
 | 
			
		||||
                        max_length=16,
 | 
			
		||||
                        verbose_name="write permission",
 | 
			
		||||
                    ),
 | 
			
		||||
                ),
 | 
			
		||||
 
 | 
			
		||||
@@ -13,12 +13,14 @@ class Channel(models.Model):
 | 
			
		||||
        verbose_name=_("name"),
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    read_access = models.PositiveSmallIntegerField(
 | 
			
		||||
    read_access = models.CharField(
 | 
			
		||||
        max_length=16,
 | 
			
		||||
        verbose_name=_("read permission"),
 | 
			
		||||
        choices=PermissionType,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    write_access = models.PositiveSmallIntegerField(
 | 
			
		||||
    write_access = models.CharField(
 | 
			
		||||
        max_length=16,
 | 
			
		||||
        verbose_name=_("write permission"),
 | 
			
		||||
        choices=PermissionType,
 | 
			
		||||
    )
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user