Add initial implementation of grants

This commit is contained in:
Tom Wiesing 2023-01-02 15:12:06 +01:00
parent b8f1281f78
commit 69b6579de7
No known key found for this signature in database
15 changed files with 308 additions and 73 deletions

View file

@ -278,5 +278,13 @@ func (au *AuthUser) Delete(ctx context.Context) error {
if err != nil {
return err
}
// run all the user delete hooks
for _, c := range au.auth.Dependencies.UserDeleteHooks {
if err := c.OnUserDelete(ctx, &au.User); err != nil {
return err
}
}
return table.Delete(&au.User).Error
}