1
0
forked from Public/pics

2 Commits

Author SHA1 Message Date
555a3dbb95 Match OIDC users by sub claim, auto-enroll, sync admin from groups
Switch from email-based OIDC matching to the stable `sub` claim.
Existing users are migrated by email on first login, new users are
auto-enrolled from OIDC claims, and admin status is synced from the
IdP's groups claim. Also expose oidc_sub on the admin edit-user page.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 19:58:58 +01:00
a71b8c9717 Add SQLite support as alternative database backend
Support config-driven choice between MySQL and SQLite via DB_DRIVER
constant, defaulting to MySQL for backward compatibility. All SQL
adaptation lives in Database.php (UDFs + query rewriting), so model
files need no changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

SQLite: remove FK constraints, revert 0→null sentinel changes

The SQLite schema had FOREIGN KEY constraints that don't exist in the
MySQL schema. These forced a cascade of 0→null changes to satisfy FK
enforcement. Removing them keeps the two backends behaviorally consistent
and minimises the diff. Real SQLite compat fixes (UDFs, query rewriting,
rowCount→count, Router fixes, EditAlbum guard) are preserved.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 15:23:41 +01:00