добавил страницу ошибки Bad request и права пользователей, добавил форму регистрации

This commit is contained in:
2024-01-17 19:36:35 +03:00
parent feb18af30b
commit ac8fc87753
9 changed files with 139 additions and 22 deletions

View File

@@ -36,9 +36,10 @@ class User(AbstractBaseUser):
def has_perm(self, perm, obj=None):
# управления правами пользователя
secure_level = -1
if self.is_authenticated:
secure_level = 0
if not self.is_authenticated:
return False
secure_level = 0
if self.is_superuser:
secure_level = 1