Commit Graph
22 Commits
Author SHA1 Message Date
marc d713b25431 ci: Node 24.22.2 (October 2026 security release) 2026-11-04 00:47:15 +01:00
marc 0f7db7e99e fix: lists decide every org through the permission system; no system-org shortcut v1.3.0 2026-11-02 10:43:29 +01:00
marc 12964793cf fix: list routes answer for permitted orgs only; org lists go through the hooks 2026-11-02 00:22:35 +01:00
marc bc05d312a6 feat: permission hooks, isAllowed and permittedOrgs v1.1.0 2026-10-21 14:38:15 +02:00
marc ee15ee0adf ci: stage releases for 2FA approval instead of publishing them
The npm trusted publisher may only stage, so a version goes live once a
maintainer approves it with 2FA. Staging needs npm 11.15 or later; Node 24.12
ships 11.6, so the job installs a pinned npm first.
2026-10-20 13:16:37 +02:00
marc 9b7003a691 ci: publish to npmjs on version tags with trusted publishing
No npm token: the workflow's OIDC identity is the npm trusted publisher, and
npm records provenance for the tag's commit.
2026-10-20 12:39:34 +02:00
marc 10fb0858f6 docs: 1.0.0 release link points at crudylabs/pgmorbac-fastify on GitHub 2026-10-03 15:32:06 +02:00
marc 73d3bc36c8 fix: exports resolve dist only
The source condition pointed consumers at TypeScript sources; it only made sense
inside the crudy monorepo.
v1.0.0
2026-10-03 10:00:58 +02:00
marc 94f1f13302 feat: @crudy/pgmorbac-fastify, MIT, its own repository
The Fastify layer over pgmorbac: permission checks, RLS session context,
management routes, PostgREST data proxy, and the migration loader for the SQL
from @crudy/pgmorbac. The SQL is no longer bundled here.
2026-10-03 09:58:18 +02:00
marc a1d6f471e2 release: 1.0.0 2026-10-02 22:48:16 +02:00
marc e470b670c2 docs: add LICENSE, NOTICE, README, CHANGELOG, and npm metadata
The public repo shipped with no license, readme, or changelog. Add them
plus standard package metadata (license field, keywords, author,
homepage, repository, bugs) so the Gitea/npm pages present the package
professionally. README and CHANGELOG describe the exports this repo
actually contains.
2026-07-23 13:34:21 +02:00
marc b6b6f7c4d5 ci: add drone pipeline v0.1.0 2026-06-22 20:49:58 +00:00
marc 91db28ee21 feat(search): global spotlight search across all records, pages and actions
Postgres-native global search (tsvector + pg_trgm, no external service) with a
config-driven index so any table self-registers. Per-row visibility via morbac
RLS. New reusable @crudy/search package for the spotlight UI; core wires it into
the bar (Ctrl/Cmd K) with no hardcoded command list.

Backend
- 0008_search.sql: app.search_index + GIN indexes, app.searchable_sources
  registry, generic trigger, app.search_register/reindex_source helpers, the
  app.search(q,limit) RPC (websearch_to_tsquery, word_similarity, RLS), grants.
- BackendModule.searchables: modules declare searchable tables; registered at
  boot in syncModules with identifier validation.
- /search data route; org/role reindex via new RoleEventSink + search-reindex.
- Core entities registered: users, orgs, roles, service connectors, emails.

Frontend
- @crudy/search: presentational Spotlight (dialog, hotkey, grouped results,
  real anchor links, in-modal shortcut hints).
- command-registry is pure logic; pages/actions derive from core-routes,
  the settings tab registry, and module navItems/settingsTabs/crudModels/commands.
- CrudModelDef yields page + create action; generic FrontendModule.commands for
  any developer action. Floating-sidebar top-right items render separately.

Modules: dashboard, license-admin (customers, plans), email-templates,
service-connectors register their searchables and CRUD models.
2026-06-20 20:49:50 +02:00
marc b5b2c5f0ae feat(api-keys): reusable key-creation modal for profile and service accounts
- Extract the profile API-key UI into a shared ApiKeysManager component
  (modal create form, full/readonly toggle, and detailed permission-scope
  picker). Profile and the service-account detail page both use it, so the
  two interfaces stay consistent and the code isn't duplicated.
- Add GET /users/:id/permission-options (service accounts), mirroring
  GET /me/permissions, so the scope picker shows exactly the pairs the
  account holds; the same query caps the key server-side.
- Service and system accounts never receive notifications: recipient
  resolution now targets account_type='user' across explicit, org-wide,
  and org-scoped paths (also fixes a stale 'human' literal that matched
  nothing).
2026-06-17 01:51:23 +02:00
marc 7a257bfa01 feat(accounts): service-account management, generated passwords, perms-view fixes
Permissions view
- Restore the System Accounts listing path and audit related tabs.
- Lock the framework system_users deny rules (is_system_managed) and
  system-principal global rules; show them read-only.

System vs service accounts
- Only account_type='system' is immutable. service-bot is no longer a
  system principal; ensureInternalAccounts repairs existing rows.
- GET /users now surfaces system/service accounts (gated by
  read/system_users, read/service_users) and Type is the first column.

Service accounts
- UI to create/edit/delete service accounts (API-only, no login).
- Admin API-key management: GET/POST/DELETE /users/:id/keys, restricted
  to service accounts, scope-capped to the account's own permissions,
  with a key-management card on the user detail page.

Password policy
- Admins never set passwords. Creating a user account auto-generates a
  strong password (shown once) and forces a change on first login;
  admin "Reset password" does the same.
- Forced change flow: login returns password_change_required +
  challenge token; POST /auth/change-password validates strength,
  clears the flag, issues the session. Enforced after password and MFA.
- Strength: length 12-128, reject common passwords and email/name.

UI
- Lock indicators in action columns use a shared LockBtn (tooltip,
  aligned with other action buttons).
- Account-type selection in create is a segmented button selector.
2026-06-16 08:52:39 +02:00
marc 8200c4650f refacto: cleanup 2026-06-06 16:00:42 +02:00
marc 8ff6bf2d0e refacto: cleanup 2026-06-06 10:35:40 +02:00
marc dfe8c8c322 feat(mappings): rework interface 2026-06-03 19:54:20 +02:00
marc 2b389ac66b feat(modules): add service connectors and cleanup settings 2026-05-17 18:35:41 +02:00
marc 4607fd1e0a feat(tests): ensure all tests pass 2026-05-07 21:49:25 +02:00
marc 941093b2cf feat(core): add webhooks 2026-05-03 18:19:39 +02:00
marc 9c87cff4a2 feat(packages): add pgmorbac package 2026-04-29 07:49:11 +02:00