MSP-6612 add 'user_blocked' audit event
This commit is contained in:
1 parent
20f3fb7b5e
commit
09dbce4125
7 files changed
+34
-13
No files matched your search
+1
-2
@@ -397,7 +397,7 @@ func (u User) Block(ctx context.Context, adminId int64, userId int) error {
|
||||
|
||||
u.auditService.SaveAuditAsync(ctx, adminId,
|
||||
fmt.Sprintf("Пользователь. %s пользователя ID %d.", userBlocked, userId),
|
||||
entity.EventUserChanged,
|
||||
entity.EventUserBlocked,
|
||||
)
|
||||
|
||||
return nil
|
||||
@@ -496,7 +496,6 @@ func (u User) ChangePassword(ctx context.Context, adminId int64, oldPassword str
|
||||
return nil
|
||||
}
|
||||
|
||||
//nolint:gomnd
|
||||
func (u User) cryptPassword(password string) (string, error) {
|
||||
passwordBytes, err := bcrypt.GenerateFromPassword([]byte(password), 12) //nolint:mnd
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user