Configure provider-specific Quartz DbContexts and migration startup tasks in the AllInOne DbMigrator now that the host no longer auto-migrates Elsa tables.
Reduce the application base class to actor handling, move shared repository and record logic into each service, inject services through constructors, and map DTOs with Volo.Abp.Mapperly.
Keep the base configuration provider-neutral, enable Elsa UserTasks only in provider-specific files, format the base settings, and align Quartz connection string names.
Split templates, instances, carbon copies, forms and participants into dedicated API modules, update imports, and resolve ESLint/stylelint issues across the frontend package.
Add the @abp/approval-flow package, AntFlow designer, template/form management, and split my-approval pages for pending, initiated, done and carbon-copy tasks.
Register the approval flow, user tasks and identity services in AllInOne, expose the API route through the gateway, add the navigation entries and apply the merged approval database migrations.
Upgrade the workflow hosts and ElsaNext modules to Elsa 3, add the WorkflowService EF Core/DbMigrator projects, and align studio, localization and runtime configuration.
Bring the micro service template up to the versions this repository now builds with, and carry
the packaging and weaving changes over so a generated solution behaves like this repository.
- bump the template package and the content props to 10.7.0 (Elsa 2.17.0, ABP 10.7.0, Microsoft.*
10.0.11, LeptonXLite 5.7.0, OpenIddict 7.7.0, MySql.EntityFrameworkCore 10.0.9) and swap the
IdentityModel package version for Duende.IdentityModel
- common.props: generate packages for the generated solution's own assemblies, pack the abppkg
content and embed the client proxy descriptors automatically
- configureawait.props: weave only in Release, stop generating the xsd and configure the weaver
inline
- Serilog: reference the console and OpenTelemetry sinks, declare them under Using, and add the
generated project namespace to the level overrides
- move the AuditLogging.IP.Location package reference out of the stray item group at the bottom
- document ASPNETCORE_HTTP_PORTS in the compose file
The platform service renders the admin menu through AbpUINavigationVueVbenAdmin5Module, so the
v1 navigation, settings and theme modules are no longer part of it. Drop them from the solution
and from the service so the retired modules stop being built with everything else.
- remove LINGYUN.Abp.UI.Navigation.VueVbenAdmin, LINGYUN.Platform.Settings.VueVbenAdmin and
LINGYUN.Platform.Theme.VueVbenAdmin from LINGYUN.MicroService.All.slnx
- drop the Platform.Theme.VueVbenAdmin project reference and PlatformThemeVueVbenAdminModule from
the platform service, and restore the alphabetical order of the AspNetCore.Authentication using
The projects themselves are kept: the AIO template still references them as packages, and they
are still registered in the AllInOne and Aspire solutions.
Apply the same split the OpenIddict grant already got to the legacy IdentityServer module, so
the OAuth login and the mini program login stop sharing a single validator, and drop the
removed AbpWeChatWorkGlobalConsts.GrantType constant that broke this project's build.
- WeChatWorkGrantValidator becomes abstract: GrantType becomes abstract and the user lookup
moves behind a FindUserInfoAsync hook; the constructor becomes protected
- add WeChatWorkOAuthGrantValidator (grant type wecom_oauth, user info exchange) and
WeChatWorkMiniProgramGrantValidator (grant type wecom_mp, code2session exchange mapped to
the user id plus the session key as user ticket)
- register both validators in AbpIdentityServerWeChatWorkModule
Fixes the CS0117 build error introduced when AbpWeChatWorkGlobalConsts.GrantType was renamed.
The QR code token grant trusted a client supplied tenant_id to switch the tenant context
before loading the user, so any caller could resolve a user id under an arbitrary tenant,
and the security events were logged under the generic login actions, which made a QR code
login indistinguishable from a password login in the audit trail.
- drop the tenant_id request parameter and use the tenant carried by the QR code itself
(QrCodeInfo.TenantId, taken from the scanning user's tenant)
- add QrCodeLoginSucceeded / QrCodeLoginFailed to IdentitySecurityLogExtendActionConsts and
use them from the QR code grant and the scan login page, including the failure log that was
missing when the user token does not match
- fix the invalid token branch, which logged LoginLockedout although the account was not
locked out; the real lockout branch keeps LoginLockedout
- update the README: correct grant_type=qr_code, document qrcode_key and drop the parameters
the flow no longer accepts (password, enterpriseId, the two factor and password change ones)
- register LINGYUN.Abp.OpenIddict.QrCode in the solution
BREAKING CHANGE: the QR code token request no longer accepts a tenant_id parameter; the tenant
is taken from the QR code. Clients that relied on passing tenant_id must drop it.
`NotificationChannelDataPropertyCache.GetProperties` is read for every payload on the
publish path (`NotificationChannelDataResolver` and `NotificationChannelDataSerializer`),
but it guarded the whole lookup with one process wide lock, so every cache hit queued
behind the lock and the first reflection plus `Expression.Compile()` for one payload type
blocked all the others. Types that have nothing to do with each other were serialized on
a single lock.
- replace the `Dictionary` plus `SyncLock` pair with a `ConcurrentDictionary<Type,
Lazy<NotificationChannelDataProperty[]>>`, so the hit path takes no lock and building
one type no longer blocks reads of another
- `Lazy<T>` keeps the build at most once: `GetOrAdd` may invoke its factory more than once
under contention, but only one instance is stored and returned, and
`LazyThreadSafetyMode.ExecutionAndPublication` makes the other threads wait for it
- move the reflection and the expression compiling behind the `Lazy` factory so they never
run while a lock is held
- extract the population into `CreateProperties`; the selector, the attribute driven key
resolution and the compiled getters/setters are unchanged, as is the returned array
(callers only enumerate it)
Tests: the cache had no concurrency coverage, which is the property this change rests on.
Add `Should_Build_Property_Metadata_Once_Under_Concurrency`, which reads five payload types
from 320 parallel calls and asserts every call observed the very same metadata instance, and
`Should_Return_Same_Instance_On_Repeated_Calls`.
Every channel needs its own message shape (a WeChat Work template card, a webhook news
article, a wx-pusher URL), but the only way to carry it was to stuff those types into
`NotificationData`, which couples the producer to the channels and forces a schema change
whenever a channel gains a field. Channels now declare their own payload types and the
property bag carries them under per channel key prefixes, so one `ExtraProperties` column
serves every channel and no notification table has to change.
- add the channel data contract to `LINGYUN.Abp.Notifications.Core`:
`NotificationChannelData` base type, `[NotificationChannelData]` /
`[NotificationChannelProperty]` annotations, `NotificationChannelDataDescriptor`,
`NotificationChannelDataFormat` and `NotificationChannelDataPresenceMode`
- add the implementation to `LINGYUN.Abp.Notifications`: `INotificationChannelDataResolver`
dispatching payloads in priority order, `INotificationChannelDataAccessor` reading and
writing typed values in the property bag, `INotificationChannelDataSerializer` for the
producer side, `INotificationChannelDataPresenceProvider`, `AbpNotificationChannelDataOptions`
and `AbpNotificationChannelDataConfigurationException` for registration time validation
- keys are namespaced per channel (`wx-work:`, `wx-work-hook:`, `wx-mp:`, `pusher:`, `plus:`)
and matched case insensitively, so channels cannot collide in the shared property bag;
complex payloads are stored as JSON strings and deserialized back with the configured
`IJsonSerializer`
- the WeChat Work channel gains 18 channel data types plus `WeChatWorkMessageFactory`, and
the webhook channel 16 plus `WeChatWorkWebhookMessageFactory`, covering text, markdown,
markdown_v2, image, news, file, voice, template card, mini program notice and mp news
- PushPlus, WxPusher and the WeChat mini program channel adopt the same contract; the mini
program keys are prefixed and the historical bare keys are kept as a read only fallback,
marked `[Obsolete]` with the provider's `ApplyLegacyKeys` as the only sanctioned read site
- delete the WxPusher `NotificationDataExtensions.SetUrl` in favour of the typed accessor
- add `WebhookTemplateCardSystemTextJsonConverter` so the abstract webhook template card
survives the property bag round trip, and make `WeChatWorkWebhookNewsMessage` public
- test projects `LINGYUN.Abp.Notifications.ChannelData.Tests`, `...PushPlus.Tests`,
`...WeChat.Work.Tests` and `...Webhook.WeChat.Work.Tests` (real ABP container, fake
senders registered through `context.Services.Replace` so no real API is called), the
mini program and wx-pusher tests now drive a fake sender, and each channel verifies
payloads restored from a raw database JSON string as well as from memory
The template card payload is written into the notification property bag as JSON and read
back when the notification is published, but TemplateCard is abstract, so Newtonsoft.Json
could never restore it ("Could not create an instance of type ... abstract class") and the
card was lost as soon as the notification was persisted or queued for a retry.
- add TemplateCardJsonConverter and TemplateCardSystemTextJsonConverter, which resolve the
concrete card from the card_type discriminator (read from the constructor IL, falling back
to the type name) and reject an unknown discriminator
- split NotificationDataWeChatWorkExtensions into partials per message type (file, mini
program, mp news, template card, text card, video, voice) and add the shared
TryGetMessagePayload helper that deserializes with the converter
- add the Safe, EnableIdTrans, EnableDuplicateCheck and DuplicateCheckInterval switches
- migrate TuiJuheNotificationPublishProvider to the NotificationPublishContext contract the
other providers already use, and skip the interceptors for notifications at or above Warn
- bind the WeChat Work mini program account through the new work-weixin/miniprogram/bind
endpoint using the code2session user id
- rename AbpNotificationOptions to AbpNotificationsPublishOptions in the tests, fix the SMS
test project reference, retarget the templating tests to net10.0, register the webhook
notification projects and add the missing IP2Region reference
Give the OAuth login and the mini program login their own WeChat Work grant types instead
of sharing one, and add the code2session exchange the mini program flow needs.
- AbpWeChatWorkGlobalConsts.GrantType becomes OAuthGrantType with the value "wecom_oauth",
and MiniProgramGrantType ("wecom_mp") is added
- WeChatWorkTokenExtensionGrant becomes abstract and exposes a FindUserInfoAsync hook;
WeChatWorkOAuthTokenExtensionGrant keeps the existing user info exchange and the new
WeChatWorkMiniProgramTokenExtensionGrant exchanges the js code through
IWeChatWorkUserFinder.GetCode2SessionAsync
- add the code2session model, response and mapping, plus the
/cgi-bin/miniprogram/jscode2session client call
- register both grant types in AbpOpenIddictWeChatWorkModule and allow both custom flows
in AllowWeChatWorkFlow, and migrate the remaining GrantType call sites
BREAKING CHANGE: AbpWeChatWorkGlobalConsts.GrantType was removed and its value changed, so
clients that authenticate with grant_type "wecom" must switch to "wecom_oauth"; the public
WeChatWorkTokenExtensionGrant is now abstract and must be subclassed.
Match a blob by its full name and an optional container id instead of joining the
container table on every existence check, and resolve the container once in the
calling service so the check is scoped to the current blob provider.
The FileSystem provider combined the user controlled blob name (and container name)
into the storage path without any validation, so an authenticated user holding the
BlobManagement permissions could read, overwrite or delete arbitrary files - and, with
the PublicAccess feature enabled, do it anonymously through the public download endpoint.
Fix (defence in depth):
- CalculateBlobName now resolves the path with Path.GetFullPath and asserts it is still
inside the current tenant directory (host or tenants/{id}); this also stops absolute
path injection, because Path.Combine discards its prefix when the second argument is
rooted. The prefix comparison adds a directory separator to avoid the classic
"blobs-evil" prefix bypass, and uses Ordinal on case sensitive file systems (Linux)
and OrdinalIgnoreCase on Windows/macOS
- new BlobManagementNameValidator (Domain.Shared) with a cross platform rule set shared by
the entities and the provider: rejects path separators, . and .. segments, the union of
invalid characters (\0 / \ : * ? " < > |), trailing dots/spaces and reserved device names
(CON/PRN/AUX/NUL/COM1-9/LPT1-9); CheckName validates a single segment, CheckPath validates
a path segment by segment
- container names are validated too: a name such as "x/../abp-c" stays inside the base path
(so the containment check cannot catch it) but resolves to another container directory,
which broke container isolation (e.g. writing into the private "users" container)
- BlobContainer.Name, Blob.Name and Blob.FullName are validated in the domain as well, so
invalid names are rejected before they are persisted
- new error codes BlobManagement:001005 (container name) and BlobManagement:002008 (blob name)
with zh-Hans/en texts
Tests:
- LINGYUN.Abp.BlobManagement.Domain.Tests (76 tests) for Blob / BlobContainer / the validator
- LINGYUN.Abp.BlobManagement.FileSystem.Tests (54 tests) drives the provider resolved from DI
(the test module enables BlobManagement:Provider=FileSystem with a temporary BasePath and
removes it on shutdown), covering traversal, absolute paths, NTFS alternate data streams,
Windows normalization collisions, container names/aliases, tenant isolation and legitimate
names
configureawait.props now provides the ConfigureAwait weaver through the Fody 6.9.3
WeaverConfiguration property and sets FodyGenerateXsd=false, so the per-project
FodyWeavers.xml files and every FodyWeavers.xsd are redundant.
- delete 450 FodyWeavers.xml and 438 FodyWeavers.xsd from the framework, modules,
services, gateways, tests and migrations projects and from the micro service template
- every removed FodyWeavers.xml was equivalent to the default supplied by configureawait.props
(439 x <ConfigureAwait ContinueOnCapturedContext="false" />, 20 x <ConfigureAwait />, whose
default is ContinueOnCapturedContext=false, and 2 of those with an XML declaration); no
Blazor / AspNetCore.Components project carried one and the template manifests do not list them
- the aio template keeps its 22 files: its own Directory.Packages.props pins Fody 6.8.0, which
does not support the WeaverConfiguration property