Files
bssapp/svc/internal/auditlog/events.go
2026-02-11 17:46:22 +03:00

36 lines
863 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package auditlog
import (
"context"
)
func ForcePasswordChangeStarted(
ctx context.Context,
targetUserID int64,
reason string, // admin_reset | login_enforced
) {
Write(ActivityLog{
UserID: IntUserIDToUUID(int(targetUserID)),
ActionType: "force_password_change_started",
ActionCategory: "auth",
Description: "kullanıcı için zorunlu parola değişimi başlatıldı",
IsSuccess: true,
ErrorMessage: reason,
})
}
func ForcePasswordChangeCompleted(
ctx context.Context,
userID int64,
source string, // reset_link | self_change | admin_reset
) {
Write(ActivityLog{
UserID: IntUserIDToUUID(int(userID)),
ActionType: "force_password_change_completed",
ActionCategory: "auth",
Description: "kullanıcı parolasını başarıyla güncelledi",
IsSuccess: true,
ErrorMessage: source,
})
}