2025-10-27 15:14:18: merge [main:187e1f07a0e8912d7c10f6568ea8ee6489639912];
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
Create and publish a Docker image / build-and-push-image (push) Canceled after 0s
This commit is contained in:
1 parent
3029e084ce
commit
71a841fee0
13 files changed
+147
-115
No files matched your search
+5
-3
@@ -4,12 +4,13 @@ import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/txix-open/isp-kit/log"
|
||||
"golang.org/x/sync/errgroup"
|
||||
"msp-admin-service/conf"
|
||||
"msp-admin-service/domain"
|
||||
"msp-admin-service/entity"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/txix-open/isp-kit/log"
|
||||
"golang.org/x/sync/errgroup"
|
||||
)
|
||||
|
||||
type AuditRepository interface {
|
||||
@@ -45,6 +46,7 @@ func NewAudit(
|
||||
entity.EventSuccessLogout: true,
|
||||
entity.EventRoleChanged: true,
|
||||
entity.EventUserChanged: true,
|
||||
entity.EventUserBlocked: true,
|
||||
}
|
||||
|
||||
eventName := make(map[string]conf.AuditEventSetting)
|
||||
|
||||
+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