Files
go-admin/cmd/migrate
zhangwenjian 8aa5a0cd9a fix🐛: bind the code generator's APIs to its menus
A role is granted an API through its menus: saving a role writes a
casbin_rule for every API bound to each menu it holds. The seed data
bound none to 代码生成 or 代码生成修改, so a role given either menu
received no API, which went unnoticed only because every generator
route skipped the role check.

Migration 1786700011000 binds the nine APIs the generator page calls
and the four its edit page calls, creating any that sys_api lacks, and
grants them to each role that already holds the menu. Menus are found
by component, so renumbered ones are found and deleted ones skipped.
Tested on SQLite, MySQL and PostgreSQL, with SQL Server in CI.
2026-09-27 19:43:19 +08:00
..