Repository navigation
Releases
Releases · hmmdlthf/gofilament
v1.40.0
Added
Panel.URL(origin): the public address used for links in emails (password reset, email verification). Without it theAPP_URLenvironment variable is used.
Security
- Password-reset poisoning: reset and verification links were built from the request's
Hostheader, which the client controls, so a forged host could send a real reset token to another site. They now usePanel.URLorAPP_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.Profilewhen 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
v1.39.0
Changed
- Roles are given per panel and tenant (role bindings):
RoleStorenow keepsRoleBinding{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.manageeverywhere defines roles and grants anything, the newroles.assignlets tenant admins grant within their tenant only roles whose permissions they hold.RolesConfig.Panels/Tenantslist where roles can be given; the screens, API (POST/DELETE /roles/bindings) and Flutter show and edit bindings. Upgrade:sqlstore.Migrateturns existing assignments into*/*bindings; customRoleStoreimplementations must replaceUserRoles/SetUserRoles/RoleUserswithListBindings/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./tenantsnow always returns{key, name, avatar}, and the schema reportstenancyand the currenttenant. - Flutter app in other languages: the app's own words (about 220 buttons, dialogs and messages) are translated through
tr(); boot sendsui_translationsfor 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
Added
- Roles and permissions:
Panel.Roles(store, RolesConfig{Permissions, FindUsers, EnforceResources})with an in-memory store orsqlstore.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 ownCan*checks enforce them, andfilament.Permissionreads them. Changes that would remove your ownroles.manageare refused.
v1.37.0
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)givesOnReorderthe position of the first id (web and API send the page's start). - Widget visibility: every built-in widget has
VisibleWhen(fn)(andCanView), likeFlutterWidget. - 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 severalLocales; the choice is remembered on the device. - Accept-Language: panels with
Localespick the first supported language from theAccept-Languageheader when no?langor cookie chooses one (API clients). - Kanban board:
Resource.Kanban(KanbanConfig{Field, Columns, Title, Description})shows records as cards in columns (web board page, API/boardand/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 theX-Tenant-IDheader, 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 fromTenantLoader, or keys allowed by the newTenantConfig.CanAccessTenant(ctx, key), are used. Upgrade: panels using tenancy without aTenantLoadermust setCanAccessTenant, 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.origcommitted by accident.
v1.36.0
Added
- Bulk edit:
Resource.BulkEditable(fields...)andOnBulkUpdateset one field on many selected records (web Change Selected bulk action, Flutter Change button,POST /resources/:slug/bulk-update), with field validation and per-recordCanEdit/ trashed checks; failures are reported per record.tables.EditBulkAction(). - Background jobs:
Panel.BackgroundJobs(JobsConfig)runs exports (web; API withbackground=1) and imports (web preview flow; API withbackground=1) after the request, with progress, a notification and a download link when done./admin/jobs/:idpage, API/jobs,/jobs/:id,/jobs/:id/download(owner only). Flutter exports use server jobs when the panel has them;adminSaveFilecan be replaced. - Impersonation:
Panel.Impersonation{CanImpersonate, OnImpersonate}lets allowed users sign in as another user (web, withPanel.Sessions) viaImpersonateURL(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.
Listreturns copies sorted newest first (the user's own and broadcast notifications were not interleaved by time).
v1.35.0
Added
- Edit conflicts for inline cells and related records: rows of a
Versionedresource carry their version (data-versionon the web,row_meta.versionin 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.Registerturns on/register(web) andPOST /api/register(withPanel.Registration());Accounts.EmailVerified/MarkEmailVerified/SendVerificationLinksend a signed verification link and keep unverified users on a "verify your email" page (web) or a 403email_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-passwordfor bearer-token clients;boot.auth.accountslists 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.
.xlsxfiles can be imported; exports gainformat=xlsxandcolumns=. API:dry_run,mapping,file_base64; results include per-row field errors (rows). Resources report animportability 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.SavedViewsShareablecontrols sharing;sqlstore.Views()keeps them in the database. API under/resources/:slug/views. - Record history:
activitylog.EnableAuditLognow gives a resource a history provider (Resource.History): the web view/edit pages show a History section,GET /resources/:slug/:id/historyserves 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 /loginnow returns a challenge, and the token is only handed out byPOST /login/two-factorafter 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) whenCanRestore/CanForceDeleteare 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
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):DateRangeFilterandNumberRangeFilter, with web inputs and a Flutter range dialog (date picker for dates). The value is"from,to";Condition/Rulesturn it into advanced-search rules forBuildAdvancedSearchSQLFor, andMatcheschecks in-memory values. Newtables.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.SummariesUsingfor totals over all matching records (also sent assummariesby the API), andTable.Groups/DefaultGroupfor 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 includeversion;filament.ExpectedVersion(ctx)givesOnUpdatethe 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()andPasswordReset()were flags with no screens behind them; withAccountsconfigured 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
Fixed
- Advanced search SQL (
pkg/tables):BuildAdvancedSearchSQLonly produced Postgres$Nplaceholders, so the query failed on SQLite and MySQL. NewBuildAdvancedSearchSQLFor(cond, columns, dialect)uses?placeholders for SQLite and MySQL (andCAST(... AS CHAR)on MySQL).BuildAdvancedSearchSQLkeeps 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
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:
RefinedFilterfilters 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 asadvanced_search, whichtables.GetAdvancedSearchparses. Export uses the same rules.