36 lines
863 B
Go
36 lines
863 B
Go
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,
|
||
})
|
||
}
|