mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-21 21:58:25 +02:00
Prepare models for new chat feature
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
19
tfjm/permissions.py
Normal file
19
tfjm/permissions.py
Normal file
@ -0,0 +1,19 @@
|
||||
# Copyright (C) 2024 by Animath
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from django.db import models
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class PermissionType(models.TextChoices):
|
||||
ANONYMOUS = 'anonymous', _("Everyone, including anonymous users")
|
||||
AUTHENTICATED = 'authenticated', _("Authenticated users")
|
||||
VOLUNTEER = 'volunteer', _("All volunteers")
|
||||
TOURNAMENT_MEMBER = 'tournament', _("All members of a given tournament")
|
||||
TOURNAMENT_ORGANIZER = 'organizer', _("Tournament organizers only")
|
||||
TOURNAMENT_JURY_PRESIDENT = 'jury_president', _("Tournament organizers and jury presidents of the tournament")
|
||||
JURY_MEMBER = 'jury', _("Jury members of the pool")
|
||||
POOL_MEMBER = 'pool', _("Jury members and participants of the pool")
|
||||
TEAM_MEMBER = 'team', _("Members of the team and organizers of concerned tournaments")
|
||||
PRIVATE = 'private', _("Private, reserved to explicit authorized users")
|
||||
ADMIN = 'admin', _("Admin users")
|
@ -68,6 +68,7 @@ INSTALLED_APPS = [
|
||||
'rest_framework.authtoken',
|
||||
|
||||
'api',
|
||||
'chat',
|
||||
'draw',
|
||||
'registration',
|
||||
'participation',
|
||||
|
@ -37,6 +37,7 @@ urlpatterns = [
|
||||
path('search/', AdminSearchView.as_view(), name="haystack_search"),
|
||||
|
||||
path('api/', include('api.urls')),
|
||||
# path('chat/', include('chat.urls')),
|
||||
path('draw/', include('draw.urls')),
|
||||
path('participation/', include('participation.urls')),
|
||||
path('registration/', include('registration.urls')),
|
||||
|
Reference in New Issue
Block a user