fix platform workflow integrity and permissions

This commit is contained in:
david
2026-07-29 14:03:10 +08:00
parent afd9dbdeb5
commit d4799cd320
44 changed files with 797 additions and 224 deletions

View File

@@ -455,11 +455,11 @@ func MockData(database *gorm.DB) error {
}
roleMenu := models.PlatformRoleMenu{
PlatformRoleID: role.ID, MenuCode: "dashboard",
PlatformRoleID: role.ID, MenuIdentity: "dashboard_overview",
}
if err := tx.Where(
"platform_role_id = ? AND menu_code = ?",
role.ID, roleMenu.MenuCode,
"platform_role_id = ? AND menu_identity = ?",
role.ID, roleMenu.MenuIdentity,
).FirstOrCreate(&roleMenu).Error; err != nil {
return fmt.Errorf("seed platform_role_menu: %w", err)
}
@@ -471,7 +471,6 @@ func entity(sequence int, status int) models.Entity {
return models.Entity{
Identity: fmt.Sprintf("%s%012d", mockIdentityPrefix, sequence),
Status: status,
Version: 1,
}
}