Skip to content

Commit

Permalink
FIX #582
Browse files Browse the repository at this point in the history
  • Loading branch information
quentinovega committed Jul 12, 2023
1 parent bc63255 commit 0a18c67
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
6 changes: 2 additions & 4 deletions daikoku/app/controllers/LoginController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,9 @@ class LoginController(DaikokuAction: DaikokuAction,
)(ctx.request)
)
case AuthProvider.LDAP =>
AuditTrailEvent(
s"unauthenticated user with $username has tried to login [LDAP provider]")
AuditTrailEvent(s"unauthenticated user with $username has tried to login [LDAP provider]")
.logUnauthenticatedUserEvent(ctx.tenant)
val ldapConfig =
LdapConfig.fromJsons(ctx.tenant.authProviderSettings)
val ldapConfig = LdapConfig.fromJsons(ctx.tenant.authProviderSettings)

LdapSupport.bindUser(username,
password,
Expand Down
11 changes: 6 additions & 5 deletions daikoku/app/login/ldap.scala
Original file line number Diff line number Diff line change
Expand Up @@ -391,11 +391,12 @@ object LdapSupport {
val userId = UserId(BSONObjectID.generate().stringify)
val team = getPersonalTeam(tenant.id, name, userId)
val user = getUser(userId,
tenant.id,
name,
email,
ldapConfig.pictureField,
attrs)
tenant.id,
name,
email,
ldapConfig.pictureField,
attrs,
isDaikokuAdmin = false)
for {
_ <- _env.dataStore.teamRepo
.forTenant(tenant.id)
Expand Down

0 comments on commit 0a18c67

Please sign in to comment.