forked from coop-cloud/authentik
Compare commits
3 Commits
6.1.1+2024
...
event_dele
Author | SHA1 | Date | |
---|---|---|---|
93f9a7b4d7 | |||
0be7e95f48 | |||
4fe52c1e5f |
@ -30,6 +30,7 @@ steps:
|
||||
SECRET_ADMIN_TOKEN_VERSION: v1
|
||||
SECRET_ADMIN_PASS_VERSION: v1
|
||||
SECRET_EMAIL_PASS_VERSION: v1
|
||||
DB_ENTRYPOINT_VERSION: v1
|
||||
trigger:
|
||||
branch:
|
||||
- main
|
||||
|
2
abra.sh
2
abra.sh
@ -178,7 +178,7 @@ for name, url in applications.items():
|
||||
quieten(){
|
||||
# 'SyntaxWarning|version_regex|"http\['
|
||||
# is a workaround to get rid of some verbose syntax warnings, this might be fixed with another version
|
||||
grep -Pv '"level": "(info|debug)"|SyntaxWarning|version_regex|"http\['
|
||||
grep -Pv '"level": "(info|debug)"|SyntaxWarning|version_regex|"http\[|RuntimeWarning:'
|
||||
}
|
||||
|
||||
add_email_templates(){
|
||||
|
19
delete_user.py
Normal file
19
delete_user.py
Normal file
@ -0,0 +1,19 @@
|
||||
model_actions = ["model_deleted"]
|
||||
model_app = "authentik_core"
|
||||
model_name = "user"
|
||||
|
||||
event = request.context.get("event", None)
|
||||
if not event:
|
||||
ak_logger.info("delete_user: No event")
|
||||
return False
|
||||
if event.action not in model_actions:
|
||||
ak_logger.info("delete_user: Non-matching action")
|
||||
return False
|
||||
if (
|
||||
event.context["model"]["app"] != model_app
|
||||
or event.context["model"]["model_name"] != model_name
|
||||
):
|
||||
ak_logger.info("delete_user: Invalid model")
|
||||
return False
|
||||
|
||||
ak_logger.info(f'model: {event.context["model"]}')
|
Reference in New Issue
Block a user