X-Git-Url: https://git.proxmox.com/?p=pve-access-control.git;a=blobdiff_plain;f=PVE%2FAuth%2FPlugin.pm;fp=PVE%2FAuth%2FPlugin.pm;h=141305336c8640dd40879eb6e084b95c51ad0fa7;hp=7a08d2797e62cf88f38689d1e25b54d40007864d;hb=89338e4d9c5f9a0795e6df057c0fa24f1c1a180b;hpb=77bfb48e0d8785393a28df11e4874a8fb66a0309 diff --git a/PVE/Auth/Plugin.pm b/PVE/Auth/Plugin.pm index 7a08d27..1413053 100755 --- a/PVE/Auth/Plugin.pm +++ b/PVE/Auth/Plugin.pm @@ -268,4 +268,32 @@ sub delete_user { # do nothing by default } +# called during addition of realm (before the new domain config got written) +# `password` is moved to %param to avoid writing it out to the config +# die to abort additon if there are (grave) problems +# NOTE: runs in a domain config *locked* context +sub on_add_hook { + my ($class, $realm, $config, %param) = @_; + # do nothing by default +} + +# called during domain configuration update (before the updated domain config got +# written). `password` is moved to %param to avoid writing it out to the config +# die to abort the update if there are (grave) problems +# NOTE: runs in a domain config *locked* context +sub on_update_hook { + my ($class, $realm, $config, %param) = @_; + # do nothing by default +} + +# called during deletion of realms (before the new domain config got written) +# and if the activate check on addition fails, to cleanup all storage traces +# which on_add_hook may have created. +# die to abort deletion if there are (very grave) problems +# NOTE: runs in a storage config *locked* context +sub on_delete_hook { + my ($class, $realm, $config) = @_; + # do nothing by default +} + 1;