core: show all applications a user can access in admin interface (#8343)

* core: show all applications a user can access in admin interface

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* minor adjustments

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* add relative time

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* use relative time in most places

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* improve admin dashboard scaling

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

---------

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L
2024-01-30 01:56:33 +01:00
committed by GitHub
parent 0052e60643
commit 07ed5e1cd9
22 changed files with 245 additions and 49 deletions

View File

@ -11,6 +11,7 @@ from rest_framework.permissions import AllowAny
from rest_framework.request import Request
from rest_framework.response import Response
from rest_framework.serializers import ModelSerializer
from rest_framework.validators import UniqueValidator
from rest_framework.viewsets import ModelViewSet
from authentik.api.authorization import SecretKeyFilter
@ -57,6 +58,11 @@ class BrandSerializer(ModelSerializer):
"web_certificate",
"attributes",
]
extra_kwargs = {
# TODO: This field isn't unique on the database which is hard to backport
# hence we just validate the uniqueness here
"domain": {"validators": [UniqueValidator(Brand.objects.all())]},
}
class Themes(models.TextChoices):