blueprints: disallow flow token

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2022-12-29 21:51:06 +01:00
parent 35678c18c5
commit 97513467ad
No known key found for this signature in database
2 changed files with 3 additions and 2 deletions

View file

@ -34,7 +34,7 @@ from authentik.core.models import (
Source,
UserSourceConnection,
)
from authentik.flows.models import Stage
from authentik.flows.models import FlowToken, Stage
from authentik.lib.models import SerializerModel
from authentik.outposts.models import OutpostServiceConnection
from authentik.policies.models import Policy, PolicyBindingModel
@ -60,6 +60,8 @@ def is_model_allowed(model: type[Model]) -> bool:
PolicyBindingModel,
# Classes that have other dependencies
AuthenticatedSession,
# Classes which are only internally managed
FlowToken,
)
return model not in excluded_models and issubclass(model, (SerializerModel, BaseMetaModel))

View file

@ -61,7 +61,6 @@
"authentik_events.notificationwebhookmapping",
"authentik_flows.flow",
"authentik_flows.flowstagebinding",
"authentik_flows.flowtoken",
"authentik_outposts.dockerserviceconnection",
"authentik_outposts.kubernetesserviceconnection",
"authentik_outposts.outpost",