aboutsummaryrefslogtreecommitdiffstats
path: root/services/auth/source/ldap/source_sync.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/auth/source/ldap/source_sync.go')
-rw-r--r--services/auth/source/ldap/source_sync.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/services/auth/source/ldap/source_sync.go b/services/auth/source/ldap/source_sync.go
index eee7bb585a..62f052d68c 100644
--- a/services/auth/source/ldap/source_sync.go
+++ b/services/auth/source/ldap/source_sync.go
@@ -16,7 +16,6 @@ import (
"code.gitea.io/gitea/modules/container"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/optional"
- "code.gitea.io/gitea/modules/util"
source_service "code.gitea.io/gitea/services/auth/source"
user_service "code.gitea.io/gitea/services/user"
)
@@ -125,8 +124,8 @@ func (source *Source) Sync(ctx context.Context, updateExisting bool) error {
IsAdmin: su.IsAdmin,
}
overwriteDefault := &user_model.CreateUserOverwriteOptions{
- IsRestricted: util.OptionalBoolOf(su.IsRestricted),
- IsActive: util.OptionalBoolTrue,
+ IsRestricted: optional.Some(su.IsRestricted),
+ IsActive: optional.Some(true),
}
err = user_model.CreateUser(ctx, usr, overwriteDefault)