Files
wekan/server/ldapAdminSettingsBridge.js
T
Lauri Ojansivu 70dcc2a134 Remove files nothing uses, and point their tests at the code that runs.
Found by following every import, re-export and require from client/main.js
and server/main.js (meteor.mainModule: only what that reaches is loaded) and
each local package's package.js:

- packages/wekan-fullcalendar/fullcalendar/ (88 files) and update.sh: the
  vendored FullCalendar v3 and the script that updated it as a git
  submodule; the package takes FullCalendar 5 from npm (Npm.depends).
- packages/wekan-fontawesome/fontawesome-free: js/, sprites/, metadata/,
  attribution.js and the .min.css copies; package.js adds only the plain CSS
  and the webfonts. Its package.json no longer names the removed files.
- models/lib/propagateMembers.js and models/lib/teamBoardMemberSync.js:
  replaced on 2026-10-14 by models/lib/groupBoardMembership.js (memberships
  that record their team or org, #4178), which the server uses. Their tests
  exercised the old modules; the same scenarios now run against planGain /
  groupChanges, and the wiring checks are kept.
- models/lib/recoveryPlan.js and its test: a model of the SQLite recovery
  policy that nothing ran; releases/ferretdb/sqlite-recovery.mjs carries it
  out and tests/sqliteVerifiedRecovery.test.cjs tests that. The Recovery
  design page says so.
- packages/wekan-ldap/server/configResolver.js: a vendored copy nothing
  imported - the LDAP package reads its settings through the app's
  accessor. Its sync test is now a check that no package carries such a
  copy; three comments that sent readers to it explain the reason instead.

docs/Design/TeamsOrganizations.md also said losing a team removes nothing;
since #4178 a team takes back what it gave.

Thanks to xet7 !
2026-10-16 22:54:48 +03:00

13 lines
799 B
JavaScript

// packages/wekan-ldap (a local Meteor package, its own isolated build unit)
// cannot import the app: an app-tree import inside packages/ resolves at
// runtime and fails with "Cannot find module" when the app boots. This is the app-side half of that boundary: it hands
// the package the app's resolver for login settings (server/lib/authConfig.js
// authEnv: the Admin Panel / People / LDAP value when one is stored, otherwise
// the LDAP_* environment variable), and reschedules LDAP background sync when
// those settings change.
import { setLdapSettingsAccessor, reconfigureLdapBackgroundSync } from 'meteor/wekan-ldap';
import { authEnv, onAuthConfigChange } from '/server/lib/authConfig';
setLdapSettingsAccessor(authEnv);
onAuthConfigChange('ldap', () => reconfigureLdapBackgroundSync());