GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Sync client accounts with the LDAP directory by veenone · Pull Request #1812 · projectsend/projectsend

Conversation

@veenone

@veenone veenone commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

I made this implementation back in v1 r1945, now I want to propose this feature in v2

Background
Directory people only got an account the first time they signed in, and nothing changed when they left.
Settings > LDAP now has a Sync tab, and php artisan projectsend:ldap-sync does the same from the command line.

Preview first, then sync.
A preview lists everyone the directory returns and what would happen to them: created, updated, restored, deactivated or kept, skipped with the reason, or unchanged. The counts are filter tabs over a paged table (10 per page), which can be searched and downloaded as CSV. Sync now sits under the list, asks for confirmation, and carries out exactly what the preview showed instead of reading the directory again. Anyone whose account changed in between is skipped. The server only accepts a sync shortly after a preview of the saved settings.

What a sync does

  • People without an account get a client account, if accounts are created on first sign-in. This happens quietly: one activity log entry for the run, not an email per account.
  • Directory clients get their name and DN refreshed.
  • Clients an administrator deleted can be restored as they were while they wait to be erased, picked one by one in the preview. People who deleted their own account stay deleted.
  • Staff and local clients are never touched.
  • Directory clients who are no longer listed are kept, unless the deactivation option is on.

Safety

  • A listing that comes back empty or can't be read never deactivates anyone.
  • The daily run (opt-in) and the comma
    nd line stop without changing anything if they would deactivate more than a fifth of the directory's clients. The preview warns at the same share.
  • A running sync can be stopped between two entries.
  • The clients a sync deactivated can be reactivated in one step.

UI
image

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ignacionelson

ignacionelson commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

Thank you for your work! Please don't forget to sign the CLA so we can check and merge

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@veenone

veenone commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@veenone
veenone force-pushed the feat/ldap-user-sync branch from 6c5a488 to 13bbe35 Compare October 7, 2026 15:01
@veenone
veenone force-pushed the feat/ldap-user-sync branch from 13bbe35 to 2a5e664 Compare November 7, 2026 00:56
veenone added 4 commits November 26, 2026 07:57
@veenone
Sync client accounts with the LDAP directory
83adab6
Directory people only got an account the first time they signed in, and
nothing changed when they left. Settings > LDAP gets a Sync tab, and
projectsend:ldap-sync does the same from the command line.

A sync applies the sign-in rules to everyone the directory lists. People
without an account get a client account, but only while accounts are
created on first sign-in. Directory clients get their name and DN
refreshed. Staff, local clients and addresses held by a deleted account
are left alone. Accounts are created quietly, with one activity log entry
for the run instead of an email per account.

Directory clients who are no longer listed are counted, and deactivated
only when that option is on. A listing that comes back empty or cannot be
read never deactivates anyone. Large directories are read in pages, and
the run is split into queued chunks. A daily run can be switched on.
@veenone
Show who a directory sync will touch before it runs
17e98d0
A preview lists everyone the directory returns and what would happen to
them, with the reason when someone is skipped. The counts are filter tabs
over the table, which can be searched and downloaded as CSV. Sync now
lives under that list and asks for confirmation, quoting the preview's
numbers. The server only accepts a sync shortly after a preview of the
settings as saved.

A new option restores clients an administrator deleted, as they were,
while they still wait to be erased. People who deleted their own account
stay deleted, and staff are never restored.

The tab follows the WAI-ARIA tabs pattern. Focus lands where results
appear, disabled actions say why, and state changes are announced.
Badges and warnings keep 4.5:1 contrast. A preview that would deactivate
a large share of the directory's clients warns that the filter is the
likelier cause.
@veenone
Make directory syncs reviewable, stoppable and reversible
50fb9ca
Sync now carries out the plan its preview showed rather than reading the
directory again. Anyone whose account changed in between is skipped.
Which deleted clients come back is ticked row by row in the preview; the
restore option only decides whether they start ticked.

The daily run and the command line have no preview, so they stop without
changing anything if they would deactivate more than a fifth of the
directory's clients. A running sync can be stopped between two entries,
and the clients a sync deactivated can be reactivated in one step.

The preview table shows ten people a page.
@veenone
Translate the strings added for the LDAP directory sync
8ffd882
Every new string on the Sync tab, in its audit entries and in its
messages, in all sixteen locales.
@veenone
veenone force-pushed the feat/ldap-user-sync branch from 2a5e664 to 8ffd882 Compare November 26, 2026 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@veenone @ignacionelson
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.