diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-11-10 13:13:16 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-10 13:13:16 +0800 |
commit | 33fca2b537d36cf998dd27425b2bb8ed5b0965f3 (patch) | |
tree | 817f392502e1c176a5cd7e80290520cb940a8416 /services/auth | |
parent | edbaa5d3f05b5ca397524587ba9db15edd61bc29 (diff) | |
download | gitea-33fca2b537d36cf998dd27425b2bb8ed5b0965f3.tar.gz gitea-33fca2b537d36cf998dd27425b2bb8ed5b0965f3.zip |
Move webhook into models/webhook/ (#17579)
Diffstat (limited to 'services/auth')
-rw-r--r-- | services/auth/source/ldap/source_sync.go | 7 | ||||
-rw-r--r-- | services/auth/sync.go | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/services/auth/source/ldap/source_sync.go b/services/auth/source/ldap/source_sync.go index 2df97aabd3..4508d1514a 100644 --- a/services/auth/source/ldap/source_sync.go +++ b/services/auth/source/ldap/source_sync.go @@ -11,6 +11,7 @@ import ( "strings" "code.gitea.io/gitea/models" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/modules/log" ) @@ -31,7 +32,7 @@ func (source *Source) Sync(ctx context.Context, updateExisting bool) error { select { case <-ctx.Done(): log.Warn("SyncExternalUsers: Cancelled before update of %s", source.loginSource.Name) - return models.ErrCancelledf("Before update of %s", source.loginSource.Name) + return db.ErrCancelledf("Before update of %s", source.loginSource.Name) default: } @@ -70,7 +71,7 @@ func (source *Source) Sync(ctx context.Context, updateExisting bool) error { log.Error("RewriteAllPublicKeys: %v", err) } } - return models.ErrCancelledf("During update of %s before completed update of users", source.loginSource.Name) + return db.ErrCancelledf("During update of %s before completed update of users", source.loginSource.Name) default: } if len(su.Username) == 0 { @@ -177,7 +178,7 @@ func (source *Source) Sync(ctx context.Context, updateExisting bool) error { select { case <-ctx.Done(): log.Warn("SyncExternalUsers: Cancelled during update of %s before delete users", source.loginSource.Name) - return models.ErrCancelledf("During update of %s before delete users", source.loginSource.Name) + return db.ErrCancelledf("During update of %s before delete users", source.loginSource.Name) default: } diff --git a/services/auth/sync.go b/services/auth/sync.go index 6d69650e5b..494dfc3a38 100644 --- a/services/auth/sync.go +++ b/services/auth/sync.go @@ -7,7 +7,7 @@ package auth import ( "context" - "code.gitea.io/gitea/models" + "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/login" "code.gitea.io/gitea/modules/log" ) @@ -29,7 +29,7 @@ func SyncExternalUsers(ctx context.Context, updateExisting bool) error { select { case <-ctx.Done(): log.Warn("SyncExternalUsers: Cancelled before update of %s", s.Name) - return models.ErrCancelledf("Before update of %s", s.Name) + return db.ErrCancelledf("Before update of %s", s.Name) default: } |