Repository navigation
Releases
v1.18.1
v1.18.1
Patch release on the v1.18 line. Fixes authorisation and query defects found by running the package against a live
instance, and removes the two frontend entry points that had no backend behind them.
- Requires: Go 1.25+,
goravel/frameworkv1.18.x - Upgrade:
go get github.com/wcz0/goravel-admin@v1.18.1, then re-rungo run . artisan admin:initto backfill the
permission/menu links (the command is idempotent, so it is safe on an existing database).
Security
- Anonymous access to the user list.
config/admin.golistedsystem/admin_usersin bothauth.exceptand
permission.except, soGET /admin-api/system/admin_usersreturned every account without a token. Both allow-lists
are now empty; unauthenticated requests get401. - Non-super-admins received
403on every endpoint.AdminUser.AllPermissions()tried to fill[]AdminPermission
from theAdminRolesrelation, which can never match, so it always returned nil. It now aggregates permissions
across all roles and de-duplicates by permission id.
Fixed
- Permission wildcards never matched. The pattern was stripped of its leading slash before matching, while
ctx.Request().Path()is/admin-api/.... Matching now goes throughtools.MatchPath, which normalises both sides. - Blank sidebar for regular admins. The seeded permissions pointed at paths this package does not serve
(/auth/rolesand friends), andadmin_permission_menuhad no rows at all. Seeds now use the real routes and create
the permission-to-menu links;admin:initbackfills them. - Every list filter was silently ignored. Goravel's
Where/WhereIn/Orderreturn a newQuery; 13 call sites
dropped the return value, so search boxes returned the full table and theid != ?uniqueness check never applied.
All sites assign the result, and OR groups useWhereAny. admin:initwas not idempotent. A rawINSERTand aCreateeach inserted the same user-role row, and the
permission/menu/relationship steps duplicated on every run. Everything isFirstOrCreatenow; three consecutive runs
keep the data constant (role_users=1 / perms=8 / menus=7 / role_perms=12 / perm_menus=18).- User list had no pagination. The response carried only
items, so amis could not render a pager, and roles were
queried per row. The list now returnstotal/page/perPage(capped at 500) and preloadsAdminRoles. - Upgrading kept stale permission paths.
admin:initusedFirstOrCreatefor the eight built-in permissions, so an
existing database kept the oldhttp_pathvalues (/auth/rolesand friends) and non-super-admins stayed blocked.
It now compares and updatesnameandhttp_pathfor those slugs when they differ. Verified by resetting one row to
["/auth/users"]and re-running the command: the row came back with the real route.
Removed
- "Get PHP Code" button and the
/dev_tools/editorpage. Both calledPOST /dev_tools/editor_parse, which was never
implemented — Go has no equivalent of owl-admin'samis()->Xxx()codegen — so the call returned an empty200. The
amis schema editor (custom-amis-editor) is unchanged and still editsadmin_pagesschemas. - The code generator leftovers.
admin_code_generatorswas a table with no model, controller or route behind it,
plus a dead/dev_tools/code_generatormenu entry and ~100 lines of unused copy in both language packs. The migration,
theadmin:doctortable check and the menu entry are gone; the migration count drops from 13 to 12. Existing
databases canDROP TABLE admin_code_generatorsand delete its row from themigrationstable. core.Menu.Extra()anddevToolMenus(). Both were dead code: nothing ever calledExtra(), and the routes it
built pointed at frontend pages that do not exist (user_setting,/dev_tools/editor,/dev_tools/code_generator).
Dev-tools pages are reached through menu records like any other admin page.- The "Differences from owl-admin" table in the README. Runtime extension install, the PHP code generator and
multi-module sub-admins are out of scope for this package rather than gaps; the README states the scope in one
paragraph.dev_tools/extensionsstill stores the extension registry and enable/disable state.
Verification
go build ./...,go vet ./...andgo test ./...pass on this branch;example/compiles.example/smoke_admin.pypasses 20/20 contract checks against a live instance and can be re-run on the same database
(each run uses a fresh unique suffix).- Live checks: anonymous →
401; a non-super-admin sees the dashboard and system menus, gets200on
system/admin_usersandsystem/admin_roles, and403onsystem/admin_menusandsystem/permissions. - The embedded frontend build contains no
editor_parsereference.
Compatibility
- No API additions or signature changes; existing hosts only need
go getplusadmin:init. - Goravel 1.17 users should use
v1.17.1from thegoravel-1.17branch.
v1.18.0
v1.18.0
First release of goravel-admin as an installable Goravel package on the v1.18 support line, and the first release that
reaches feature parity with owl-admin v4.7.5 on the backend contract.
- Requires: Go 1.25+,
goravel/frameworkv1.18.x - Frontend: owl-admin v4.7.5 build (amis 6.13.0) — no frontend changes needed
- Database: SQLite, MySQL, PostgreSQL or SQL Server
Highlights
- Installable package.
go run github.com/wcz0/goravel-admin/setup installregisters the service provider and
writes an optionalconfig/admin.goskeleton. Migrations mount themselves duringBoot; the installer no longer
touchesbootstrap/migrations.go. - Captcha on login.
GET /captchaissues a data-URI image and a single-use session id; enable it with
ADMIN_LOGIN_CAPTCHA=true. - Custom amis pages. Page schemas are stored in
admin_pagesand served throughGET /page_schema?sign=; menus of
typeurl_type=4render them. - Chunked upload.
upload_chunk_start/upload_chunk/upload_chunk_finishwith md5 verification per part, a
target directory allow-list and script extensions rejected. - xlsx export. List pages get "export all / this page / selected" actions; downloads go through an HMAC-signed,
expiring_download_exportURL with path traversal protection. - Dev tools. Pages, dynamic APIs (10 built-in templates), relationships (9 types with
preview_code) and an
extension registry, enabled withADMIN_SHOW_DEVELOPMENT_TOOLS=true. - Icon search.
GET /_iconify_searchserves 220k iconify names embedded in the binary. - Console commands.
admin:create-user,admin:reset-passwordandadmin:doctor. - English docs.
README.md(English) andREADME.zh-CN.md(Chinese); this changelog is English only.
Breaking changes
The repository is no longer a skeleton application. If you forked or copied app/** from an earlier commit:
- controllers, middleware, models, migrations, commands and routes now live at the package root with imports under
github.com/wcz0/goravel-admin/... - the host
main.go,bootstrap/andconfig/skeletons moved toexample/ - default configuration is provided by
config.New()and merged into host configuration (host wins) during
ServiceProvider.Register - routes, assets and the embedded entry page are registered in
ServiceProvider.Boot; prefixes remain/admin,
/admin-assetsand/admin-api goravel-authzis gone; permissions are handled by the built-in RBAC and the permission columnvaluewas renamed
toslug
Upgrade guide
go get github.com/wcz0/goravel-admin@v1.18.0
go run github.com/wcz0/goravel-admin/setup install
go run . artisan migrate
go run . artisan admin:doctoradmin:doctor verifies APP_KEY, database connectivity, the 13 core tables, admin accounts, home menu uniqueness and
broken menu parents. If you upgraded from a version that used goravel-authz, drop the casbin_rules table and the
admin_rule model — both are no longer used.
Compatibility
admin.auth.guarddefaults toadminand is now used for both token issuing and middleware verification. If you
customisedconfig/auth.go, keep this key in sync.- Goravel 1.17 users should stay on the
goravel-1.17branch (v1.17.x). Goravel 1.16 is not supported: it lacks
foundation.Setup(),packages.Setup.Paths()andmodify.RegisterProvider. - owl-admin capabilities with no Go equivalent (runtime extension install, PHP code generator, amis DSL editor,
multi-module) are documented in the README under "Differences from owl-admin".
Verification
go build ./...,go vet ./...,go test ./...pass;example/compiles.example/smoke_admin.pypasses 17/17 contract checks against a live instance: login,_settings, captcha, iconify
search, page create +page_schema+ duplicate sign, rejected ghost ids, dynamic API duplicate path, relationship
types and preview, extension registry withid=0rejection, chunked upload, export download plus tampered-signature
rejection, profile update, menus, and the schema of the four built-in list pages.
v1.17.1
v1.17.1
Patch release on the v1.17 line. Fixes authorisation and query defects found by running the package against a live
instance, and removes the two frontend entry points that had no backend behind them.
- Requires: Go 1.25+,
goravel/frameworkv1.17.x - Upgrade:
go get github.com/wcz0/goravel-admin@v1.17.1, then re-rungo run . artisan admin:initto backfill the
permission/menu links (the command is idempotent, so it is safe on an existing database).
Security
- Anonymous access to the user list.
config/admin.golistedsystem/admin_usersin bothauth.exceptand
permission.except, soGET /admin-api/system/admin_usersreturned every account without a token. Both allow-lists
are now empty; unauthenticated requests get401. - Non-super-admins received
403on every endpoint.AdminUser.AllPermissions()tried to fill[]AdminPermission
from theAdminRolesrelation, which can never match, so it always returned nil. It now aggregates permissions
across all roles and de-duplicates by permission id.
Fixed
- Permission wildcards never matched. The pattern was stripped of its leading slash before matching, while
ctx.Request().Path()is/admin-api/.... Matching now goes throughtools.MatchPath, which normalises both sides. - Blank sidebar for regular admins. The seeded permissions pointed at paths this package does not serve
(/auth/rolesand friends), andadmin_permission_menuhad no rows at all. Seeds now use the real routes and create
the permission-to-menu links;admin:initbackfills them. - Every list filter was silently ignored. Goravel's
Where/WhereIn/Orderreturn a newQuery; 13 call sites
dropped the return value, so search boxes returned the full table and theid != ?uniqueness check never applied.
All sites assign the result, and OR groups useWhereAny. admin:initwas not idempotent. A rawINSERTand aCreateeach inserted the same user-role row, and the
permission/menu/relationship steps duplicated on every run. Everything isFirstOrCreatenow; three consecutive runs
keep the data constant (role_users=1 / perms=8 / menus=7 / role_perms=12 / perm_menus=18).- User list had no pagination. The response carried only
items, so amis could not render a pager, and roles were
queried per row. The list now returnstotal/page/perPage(capped at 500) and preloadsAdminRoles. - Upgrading kept stale permission paths.
admin:initusedFirstOrCreatefor the eight built-in permissions, so an
existing database kept the oldhttp_pathvalues (/auth/rolesand friends) and non-super-admins stayed blocked.
It now compares and updatesnameandhttp_pathfor those slugs when they differ. Verified by resetting one row to
["/auth/users"]and re-running the command: the row came back with the real route.
Removed
- "Get PHP Code" button and the
/dev_tools/editorpage. Both calledPOST /dev_tools/editor_parse, which was never
implemented — Go has no equivalent of owl-admin'samis()->Xxx()codegen — so the call returned an empty200. The
amis schema editor (custom-amis-editor) is unchanged and still editsadmin_pagesschemas. - The code generator leftovers.
admin_code_generatorswas a table with no model, controller or route behind it,
plus a dead/dev_tools/code_generatormenu entry and ~100 lines of unused copy in both language packs. The migration,
theadmin:doctortable check and the menu entry are gone; the migration count drops from 13 to 12. Existing
databases canDROP TABLE admin_code_generatorsand delete its row from themigrationstable. core.Menu.Extra()anddevToolMenus(). Both were dead code: nothing ever calledExtra(), and the routes it
built pointed at frontend pages that do not exist (user_setting,/dev_tools/editor,/dev_tools/code_generator).
Dev-tools pages are reached through menu records like any other admin page.- The "Differences from owl-admin" table in the README. Runtime extension install, the PHP code generator and
multi-module sub-admins are out of scope for this package rather than gaps; the README states the scope in one
paragraph.dev_tools/extensionsstill stores the extension registry and enable/disable state.
Verification
go build ./...,go vet ./...andgo test ./...pass on this branch;example/compiles.example/smoke_admin.pypasses 20/20 contract checks against a live instance and can be re-run on the same database
(each run uses a fresh unique suffix).- Live checks: anonymous →
401; a non-super-admin sees the dashboard and system menus, gets200on
system/admin_usersandsystem/admin_roles, and403onsystem/admin_menusandsystem/permissions. - The embedded frontend build contains no
editor_parsereference.
Compatibility
- No API additions or signature changes; existing hosts only need
go getplusadmin:init. - This is the Goravel 1.17 line (
goravel/frameworkv1.17.3). Goravel 1.18 users should usev1.18.1frommain.
v1.17.0
v1.17.0
First release of goravel-admin as an installable Goravel package on the v1.17 support line, and the first release that
reaches feature parity with owl-admin v4.7.5 on the backend contract.
- Requires: Go 1.25+,
goravel/frameworkv1.17.x (the example app pinsgin v1.17.1,redis v1.17.1,
sqlite v1.17.0) - Frontend: owl-admin v4.7.5 build (amis 6.13.0) — no frontend changes needed
- Database: SQLite, MySQL, PostgreSQL or SQL Server
Highlights
- Installable package.
go run github.com/wcz0/goravel-admin/setup installregisters the service provider and
writes an optionalconfig/admin.goskeleton. Migrations mount themselves duringBoot; the installer no longer
touchesbootstrap/migrations.go. - Captcha on login.
GET /captchaissues a data-URI image and a single-use session id; enable it with
ADMIN_LOGIN_CAPTCHA=true. - Custom amis pages. Page schemas are stored in
admin_pagesand served throughGET /page_schema?sign=; menus of
typeurl_type=4render them. - Chunked upload.
upload_chunk_start/upload_chunk/upload_chunk_finishwith md5 verification per part, a
target directory allow-list and script extensions rejected. - xlsx export. List pages get "export all / this page / selected" actions; downloads go through an HMAC-signed,
expiring_download_exportURL with path traversal protection. - Dev tools. Pages, dynamic APIs (10 built-in templates), relationships (9 types with
preview_code) and an
extension registry, enabled withADMIN_SHOW_DEVELOPMENT_TOOLS=true. - Icon search.
GET /_iconify_searchserves 220k iconify names embedded in the binary. - Console commands.
admin:create-user,admin:reset-passwordandadmin:doctor. - English docs.
README.md(English) andREADME.zh-CN.md(Chinese); this changelog is English only.
Breaking changes
The repository is no longer a skeleton application. If you forked or copied app/** from an earlier commit:
- controllers, middleware, models, migrations, commands and routes now live at the package root with imports under
github.com/wcz0/goravel-admin/... - the host
main.go,bootstrap/andconfig/skeletons moved toexample/ - default configuration is provided by
config.New()and merged into host configuration (host wins) during
ServiceProvider.Register - routes, assets and the embedded entry page are registered in
ServiceProvider.Boot; prefixes remain/admin,
/admin-assetsand/admin-api goravel-authzis gone; permissions are handled by the built-in RBAC and the permission columnvaluewas renamed
toslug
Upgrade guide
go get github.com/wcz0/goravel-admin@v1.17.0
go run github.com/wcz0/goravel-admin/setup install
go run . artisan migrate
go run . artisan admin:doctoradmin:doctor verifies APP_KEY, database connectivity, the 13 core tables, admin accounts, home menu uniqueness and
broken menu parents. If you upgraded from a version that used goravel-authz, drop the casbin_rules table and the
admin_rule model — both are no longer used.
Compatibility
- This line targets
goravel/frameworkv1.17.x. Compared withmain(v1.18) the differences are confined to the
framework contract: middleware is afunc(ctx http.Context)closure becausehttp.Middlewareis a function type in
1.17, and validation rules usemap[string]stringinstead ofmap[string]any. admin.auth.guarddefaults toadminand is now used for both token issuing and middleware verification. If you
customisedconfig/auth.go, keep this key in sync.- Goravel 1.16 is not supported: it lacks
foundation.Setup(),packages.Setup.Paths()and
modify.RegisterProvider. - owl-admin capabilities with no Go equivalent (runtime extension install, PHP code generator, amis DSL editor,
multi-module) are documented in the README under "Differences from owl-admin".
Verification
go build ./...,go vet ./...,go test ./...pass;example/compiles againstgoravel/frameworkv1.17.3.example/smoke_admin.pypasses 17/17 contract checks against a live instance on this branch: login,_settings,
captcha, iconify search, page create +page_schema+ duplicate sign, rejected ghost ids, dynamic API duplicate
path, relationship types and preview, extension registry withid=0rejection, chunked upload, export download plus
tampered-signature rejection, profile update, menus, and the schema of the four built-in list pages.
v1.0.0
v0.0.1: 勉强可用版本, 权限管理未完成
Full Changelog: v0.0.1...v0.0.1