[PR #1478] [MERGED] LDAP user synchronization #15921

Closed
opened 2025-11-02 11:57:56 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/1478
Author: @lafriks
Created: 4/10/2017
Status: Merged
Merged: 5/10/2017
Merged by: @bkcsoft

Base: masterHead: master


📝 Commits (10+)

  • 0defcb4 Refactor LDAP SearchEntry return type
  • 9ef5a6f Implememt method to search all LDAP users that match source user filter
  • 38a0323 Optimize dublicate code
  • 9b7043a Add job to syncronise users with LDAP
  • 9b330de Add comment to SyncExternalUsers function
  • 46f62c9 Specify in app.ini that only LDAP user sync is supported
  • 2138b3e Add comments to app.ini about external source synchronization job
  • dc137fb Add identation back autochanged by goreturns
  • d496de1 Add check to not change admin flag if no LDAP admin filter is set
  • 5cfbd75 * Add login source option to enable user synchronization

📊 Changes

15 files changed (+355 additions, -51 deletions)

View changed files

📝 conf/app.ini (+10 -0)
📝 models/login_source.go (+23 -18)
📝 models/migrations/migrations.go (+2 -0)
models/migrations/v31.go (+35 -0)
📝 models/user.go (+127 -0)
📝 modules/auth/auth_form.go (+1 -0)
📝 modules/auth/ldap/ldap.go (+97 -28)
📝 modules/cron/cron.go (+11 -0)
📝 modules/setting/setting.go (+17 -0)
📝 options/locale/locale_en-US.ini (+3 -1)
📝 routers/admin/admin.go (+4 -0)
📝 routers/admin/auths.go (+7 -4)
📝 templates/admin/auth/edit.tmpl (+8 -0)
📝 templates/admin/auth/new.tmpl (+6 -0)
📝 templates/admin/dashboard.tmpl (+4 -0)

📄 Description

Ported from my Gogs pull request that I have been using in production for about a year but as it is still not accepted in Gogs I am posting it here in hope to sooner migrate to Gitea


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/1478 **Author:** [@lafriks](https://github.com/lafriks) **Created:** 4/10/2017 **Status:** ✅ Merged **Merged:** 5/10/2017 **Merged by:** [@bkcsoft](https://github.com/bkcsoft) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (10+) - [`0defcb4`](https://github.com/go-gitea/gitea/commit/0defcb41716bc6eb168a2e84790c2f174a34a408) Refactor LDAP SearchEntry return type - [`9ef5a6f`](https://github.com/go-gitea/gitea/commit/9ef5a6f6e559aa21ee771c3a1b3e0c25f54d9aad) Implememt method to search all LDAP users that match source user filter - [`38a0323`](https://github.com/go-gitea/gitea/commit/38a032386c6d8971ae18c7a6e335ff0fe2a1e6ee) Optimize dublicate code - [`9b7043a`](https://github.com/go-gitea/gitea/commit/9b7043a44c0f7c8823dcfe23667ad7ac757fd2f0) Add job to syncronise users with LDAP - [`9b330de`](https://github.com/go-gitea/gitea/commit/9b330decd44ba9835eac12aad966a11a4e90a799) Add comment to SyncExternalUsers function - [`46f62c9`](https://github.com/go-gitea/gitea/commit/46f62c9e48ad0ea7855cdb0c3cc356eb95ba7ac6) Specify in app.ini that only LDAP user sync is supported - [`2138b3e`](https://github.com/go-gitea/gitea/commit/2138b3ef928a11a7fb09bb90334a1758712b366c) Add comments to app.ini about external source synchronization job - [`dc137fb`](https://github.com/go-gitea/gitea/commit/dc137fbd2cda0eae7ff291f14e6d5e898e0d899c) Add identation back autochanged by goreturns - [`d496de1`](https://github.com/go-gitea/gitea/commit/d496de14abf0611c3769ec429ecf46890ed47f24) Add check to not change admin flag if no LDAP admin filter is set - [`5cfbd75`](https://github.com/go-gitea/gitea/commit/5cfbd7587b40ed182f200e64e2918286dcb4ccc8) * Add login source option to enable user synchronization ### 📊 Changes **15 files changed** (+355 additions, -51 deletions) <details> <summary>View changed files</summary> 📝 `conf/app.ini` (+10 -0) 📝 `models/login_source.go` (+23 -18) 📝 `models/migrations/migrations.go` (+2 -0) ➕ `models/migrations/v31.go` (+35 -0) 📝 `models/user.go` (+127 -0) 📝 `modules/auth/auth_form.go` (+1 -0) 📝 `modules/auth/ldap/ldap.go` (+97 -28) 📝 `modules/cron/cron.go` (+11 -0) 📝 `modules/setting/setting.go` (+17 -0) 📝 `options/locale/locale_en-US.ini` (+3 -1) 📝 `routers/admin/admin.go` (+4 -0) 📝 `routers/admin/auths.go` (+7 -4) 📝 `templates/admin/auth/edit.tmpl` (+8 -0) 📝 `templates/admin/auth/new.tmpl` (+6 -0) 📝 `templates/admin/dashboard.tmpl` (+4 -0) </details> ### 📄 Description Ported from my [Gogs pull request](https://github.com/gogits/gogs/pull/3062) that I have been using in production for about a year but as it is still not accepted in Gogs I am posting it here in hope to sooner migrate to Gitea --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 11:57:56 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#15921