Skip to content

Releases

v1.40.0

Choose a tag to compare

@hmmdlthf hmmdlthf released this 17 Nov 21:02

Added

  • Panel.URL(origin): the public address used for links in emails (password reset, email verification). Without it the APP_URL environment variable is used.

Security

  • Password-reset poisoning: reset and verification links were built from the request's Host header, which the client controls, so a forged host could send a real reset token to another site. They now use Panel.URL or APP_URL; the request host is only a last resort, with a warning.

Fixed

  • Authenticator apps listed the user's internal id: the two-factor setup (web and API) now labels the account with the email from Accounts.Profile when there is one.
  • GoLaravel v1.17.2: two-factor codes accept one step of clock drift either side again (only the current 30-second code worked).

v1.39.1

Choose a tag to compare

@hmmdlthf hmmdlthf released this 17 Nov 20:24

Changed

  • GoLaravel v1.17.1: panels using Panel.Sessions(mgr, ...) no longer build golaravel's default session manager (no "no SecretKey" warning at startup), and the session CSRF check compares tokens in constant time.

v1.39.0

Choose a tag to compare

@hmmdlthf hmmdlthf released this 17 Nov 13:19

Changed

  • Roles are given per panel and tenant (role bindings): RoleStore now keeps RoleBinding{UserID, Role, Panel, Tenant} (* = all) instead of a flat user → roles list. Permissions come from the bindings covering the current panel and tenant; users need a binding to enter a panel (RolesConfig.RequirePanelAccess, default on); roles.manage everywhere defines roles and grants anything, the new roles.assign lets tenant admins grant within their tenant only roles whose permissions they hold. RolesConfig.Panels / Tenants list where roles can be given; the screens, API (POST/DELETE /roles/bindings) and Flutter show and edit bindings. Upgrade: sqlstore.Migrate turns existing assignments into */* bindings; custom RoleStore implementations must replace UserRoles/SetUserRoles/RoleUsers with ListBindings/AddBinding/RemoveBinding.

Added

  • Flutter tenant switcher: panels with tenancy get a tenant menu in the Flutter topbar; the chosen tenant is sent as X-Tenant-ID (checked against the user's tenants by the panel) and remembered on the device. /tenants now always returns {key, name, avatar}, and the schema reports tenancy and the current tenant.
  • Flutter app in other languages: the app's own words (about 220 buttons, dialogs and messages) are translated through tr(); boot sends ui_translations for the user's language. Arabic, German, Spanish and French are built in, Panel.UITranslations(locale, map) adds or overrides any language, and a test fails when a new app string has no translation.

v1.38.0

Choose a tag to compare

@hmmdlthf hmmdlthf released this 17 Nov 12:40

Added

  • Roles and permissions: Panel.Roles(store, RolesConfig{Permissions, FindUsers, EnforceResources}) with an in-memory store or sqlstore.Roles(). A Roles screen (web, API /roles, /roles/users, Flutter) creates roles, ticks permissions (generated per resource, roles.manage, *, your own) and assigns them to users; resources without their own Can* checks enforce them, and filament.Permission reads them. Changes that would remove your own roles.manage are refused.

v1.37.0

Choose a tag to compare

@hmmdlthf hmmdlthf released this 17 Nov 12:25

Added

  • Reorder in Flutter: reorderable tables get a Reorder button in the Flutter list (a drag list of the page's rows). filament.ReorderOffset(ctx) gives OnReorder the position of the first id (web and API send the page's start).
  • Widget visibility: every built-in widget has VisibleWhen(fn) (and CanView), like FlutterWidget.
  • Flutter language and RTL: the app lays itself out right to left when the panel's language is RTL, sends the chosen language as Accept-Language, and offers a language menu (account menu) when the panel has several Locales; the choice is remembered on the device.
  • Accept-Language: panels with Locales pick the first supported language from the Accept-Language header when no ?lang or cookie chooses one (API clients).
  • Kanban board: Resource.Kanban(KanbanConfig{Field, Columns, Title, Description}) shows records as cards in columns (web board page, API /board and /board/move, Flutter Board view); moving a card is a validated, permission- and conflict-checked edit of that field.

Fixed

  • Reordering pages and filtered lists: only the current page's ids were sent, with nothing telling where the page starts, so saving positions on page 2 collided with page 1. Drag handles also showed while searching, filtering, grouping or sorting by another column, where the visible order is not the real one; they now show only on the plain list (or sorted by the reorder column).
  • Reorder without a handler answered success; it is now 404.
  • Security: tenant could be chosen by the request: without a TenantLoader, the tenant named by the X-Tenant-ID header, the tenant cookie, the path or the subdomain was trusted as is, so a user could act in another tenant. With a loader that returned no tenants, the raw key was used too, and a tenant guessed before the user was known stayed in place. Now only tenants from TenantLoader, or keys allowed by the new TenantConfig.CanAccessTenant(ctx, key), are used. Upgrade: panels using tenancy without a TenantLoader must set CanAccessTenant, otherwise no tenant is selected.
  • API tenant switch accepted any tenant key and did not call OnTenantSwitch; it now checks membership like the web switch (403 otherwise), calls the hook and sets a Secure cookie on HTTPS.
  • Hidden widgets leaked data: the web dashboard ignored a widget's CanView, and /widgets/:id/data (web and API) served any widget's chart data by id. Hidden widgets are now left out everywhere and their data answers 404.
  • Removed a stray pkg/filament/api.go.orig committed by accident.

v1.36.0

Choose a tag to compare

@hmmdlthf hmmdlthf released this 17 Nov 11:39

Added

  • Bulk edit: Resource.BulkEditable(fields...) and OnBulkUpdate set one field on many selected records (web Change Selected bulk action, Flutter Change button, POST /resources/:slug/bulk-update), with field validation and per-record CanEdit / trashed checks; failures are reported per record. tables.EditBulkAction().
  • Background jobs: Panel.BackgroundJobs(JobsConfig) runs exports (web; API with background=1) and imports (web preview flow; API with background=1) after the request, with progress, a notification and a download link when done. /admin/jobs/:id page, API /jobs, /jobs/:id, /jobs/:id/download (owner only). Flutter exports use server jobs when the panel has them; adminSaveFile can be replaced.
  • Impersonation: Panel.Impersonation{CanImpersonate, OnImpersonate} lets allowed users sign in as another user (web, with Panel.Sessions) via ImpersonateURL(id), shows a banner with Return to my account, blocks account changes and nested impersonation while impersonating; filament.ImpersonatorID(ctx).
  • Flutter notification bell: with Panel.DatabaseNotifications-style notifications on (schema.notifications), the Flutter topbar shows a bell with the unread count (checked every minute) and a list to read, open (action links; background-job downloads go through the API), mark all read and clear.

Fixed

  • Web bulk actions needed delete rights: every bulk action (export, restore, ...) was refused without CanDeleteAny; only bulk delete (and unknown actions) need it now.
  • API bulk delete hid errors: without a bulk delete handler, per-record delete errors were ignored and the request reported success.
  • Broadcast notifications (memory store): one user marking a notification sent to everyone as read marked it read for every user; reads are now per user, as in the SQL store. List returns copies sorted newest first (the user's own and broadcast notifications were not interleaved by time).

v1.35.0

Choose a tag to compare

@hmmdlthf hmmdlthf released this 17 Nov 10:51

Added

  • Edit conflicts for inline cells and related records: rows of a Versioned resource carry their version (data-version on the web, row_meta.version in the API); inline cell saves send it, get 409 when the record changed meanwhile, and return the new version. RelationManager.Versioned(fn) checks related-record edits (web modal and API, version in the relation form). The version is only compared after edit rights are checked.
  • Self-registration and email verification: Accounts.Register turns on /register (web) and POST /api/register (with Panel.Registration()); Accounts.EmailVerified / MarkEmailVerified / SendVerificationLink send a signed verification link and keep unverified users on a "verify your email" page (web) or a 403 email_unverified (API). Flutter gets a sign-up screen and a verify-email screen (AdminStage.verifyEmail).
  • Account screens in Flutter and the API: /account (profile), /account/password, /account/two-factor/* (setup, confirm, turn off, new recovery codes) and /forgot-password for bearer-token clients; boot.auth.accounts lists what is available. The Flutter app adds a Your account screen, a Forgot your password? dialog and the two-factor code step at sign-in.
  • Two-factor recovery codes: with Accounts.RecoveryCodes / SaveRecoveryCodes, turning two-factor on makes 8 single-use codes (shown once, stored as SHA-256 hashes) that work at the sign-in challenge in place of an authenticator code. The profile shows how many are left and can make a new set; turning two-factor off removes them.
  • Flutter phone layout: the card list now shows group headers, group subtotals and the "This page" / "All results" summaries, like the table.
  • Import preview and Excel: imports (web, API, new Flutter Import dialog) now preview the file first: columns are matched to form fields (editable), every row is validated, and the problems are listed before the valid rows are imported. .xlsx files can be imported; exports gain format=xlsx and columns=. API: dry_run, mapping, file_base64; results include per-row field errors (rows). Resources report an import ability to API clients.
  • Saved views: Panel.SavedViews(store) lets users save the current list state (search, sort, filters, advanced search, columns, grouping, page size) under a name and share it; a Views menu on web and Flutter lists, applies and deletes them. SavedViewsShareable controls sharing; sqlstore.Views() keeps them in the database. API under /resources/:slug/views.
  • Record history: activitylog.EnableAuditLog now gives a resource a history provider (Resource.History): the web view/edit pages show a History section, GET /resources/:slug/:id/history serves it, and the Flutter record form has a History button. HistoryVisible, EnableAuditLogWith(res, AuditOptions{Except, NoHistory}), filament.SetCreatedID. Inline cell edits and bulk deletes are logged.

Fixed

  • API sign-in skipped two-factor: users with two-factor sign-in on could get an API token (and sign in to the Flutter app) with the password alone. POST /login now returns a challenge, and the token is only handed out by POST /login/two-factor after a valid code.
  • Imports skipped form validation: imported rows went straight to OnCreate, without the create form's rules. They are now validated like the create form.
  • Web Export ignored the list's filters: the Export header action always exported every record as CSV. It now offers CSV and Excel of the current search, filters, advanced search and sort.
  • Header actions hidden: when a resource allowed creating records, the list replaced the table's header actions (Import, Export, custom ones) with the New button.
  • Audit log diffs: updates compared the whole stored record with the submitted form, so untouched fields showed as removed and differently named keys (FullName / full_name) as changed; only real changes are recorded now, and no-op saves are not logged.
  • Audit log stored secrets: password values were stored in created / updated entries. Password fields and *password* / *secret* / *token* fields are now hidden.
  • Web edit form empty for struct records: the edit page only filled the form when records were maps. Struct records now fill it too (loose name matching); password fields are never filled.
  • Soft deletes: the "trashed" filter is now part of the API schema, so the Flutter app can show and restore trashed records. Trashed records can no longer be edited, inline-edited or deleted again (409; the web edit page offers Restore). Restore and force delete fall back to the resource's delete permission (CanDeleteAny) when CanRestore / CanForceDelete are not set, answer 404 on resources without soft deletes or handlers, and report handler errors instead of claiming success (single and bulk).

v1.34.0

Choose a tag to compare

@hmmdlthf hmmdlthf released this 17 Nov 05:53

Added

  • Account screens (web engine): Panel.Accounts(...) adds a profile page (name and email), change password, forgot / reset password and two-factor sign-in with an authenticator app (set up and turned off from the profile page). Built on golaravel's hash, reset-token broker, TOTP, cache and sessions; reset and two-factor requests are throttled, codes and reset links are single-use, and a password change signs out the user's other devices.
  • Range filters (pkg/tables): DateRangeFilter and NumberRangeFilter, with web inputs and a Flutter range dialog (date picker for dates). The value is "from,to"; Condition / Rules turn it into advanced-search rules for BuildAdvancedSearchSQLFor, and Matches checks in-memory values. New tables.FilterValues(query) collects a request's filter values.
  • Table summaries and grouping: Summarize(...) on columns (sum, average, count, min, max) for the page and each group, Resource.SummariesUsing for totals over all matching records (also sent as summaries by the API), and Table.Groups / DefaultGroup for grouped rows with headers and subtotals. Web tables and the Flutter list.
  • Edit-conflict detection: Resource.Versioned(fn) makes edit forms (web and Flutter) send the version they were opened with (_version); a save after someone else's change is refused with 409 and offers Reload or Overwrite. The form and record API responses include version; filament.ExpectedVersion(ctx) gives OnUpdate the expected version for a conditional write. Inline cell edits are not checked.

Fixed

  • Topbar user menu: the web topbar showed a fixed "Administrator" label with no way to sign out, and the user menu (Panel.UserMenu) was never rendered. It now shows the user's name with Profile (when available), Sign Out and custom items.
  • Profile() and PasswordReset() were flags with no screens behind them; with Accounts configured they now have pages.
  • Web checkbox filters: only the first checked value of a refined filter reached the list handler. Repeated filter_* values are now joined with ,, as the API and Flutter already sent them.
  • Web pagination links dropped the search, sort, page size and filters; they now keep the list state.

GoFilament v1.33.1 - advanced search SQL for SQLite and MySQL

Choose a tag to compare

@hmmdlthf hmmdlthf released this 16 Nov 22:49
b7ac2d4

Fixed

  • Advanced search SQL (pkg/tables): BuildAdvancedSearchSQL only produced Postgres $N placeholders, so the query failed on SQLite and MySQL. New BuildAdvancedSearchSQLFor(cond, columns, dialect) uses ? placeholders for SQLite and MySQL (and CAST(... AS CHAR) on MySQL). BuildAdvancedSearchSQL keeps its Postgres output.
  • LIKE wildcards: % and _ typed into contains / starts with / ends with rules are now matched literally (ESCAPE '!') instead of matching everything.

GoFilament v1.33.0 - Flutter resizable columns, refined filters, advanced search

Choose a tag to compare

@hmmdlthf hmmdlthf released this 16 Nov 22:12
ef65d08

Added

  • Flutter lists (flutter/gofilament_admin):
    • Resizable columns: drag a header's handle to set a column's width, double-tap it to go back to automatic. Widths are remembered per resource, like the column picker.
    • Refined filters: RefinedFilter filters open a checkbox list with the server's live counts and send the checked values (filter_<column>=a,b). Before, they showed as single-choice menus.
    • Advanced search: resources with AdvancedSearch(cols...) get a rule builder (field, operator, value, match all or any) sent as advanced_search, which tables.GetAdvancedSearch parses. Export uses the same rules.