Changelog - 2026-10-07
Feature modules and permissions
New FeatureIn one line. An application lists the feature packages it mounts in features(), and ARDOR binds their configurations, mounts their resources and routes, and merges their messages; react-admin's canAccess is answered by an IPermissionProvider the application binds. Two shells can mount the same feature packages.
What changed
- Types.
IFeatureBase(kernel):name,configurations(the feature's@configuration()classes, by value),permissions(declared, never enforced).IFeature<TExtension>(admin) addsresources,routes,messages, and a shell's own fields throughTExtension.defineFeature()types one. features()on the application class. The list is bound underCoreBindings.FEATURESafter the stereotypes and beforebindingList()andbindContext(). It throws on two features with one name, and on a listed configuration that was never discovered.ArdorApplicationmounts the application's ownresourcesandcustomRoutes, then each feature's.resourcesis now optional. A resource name mounted twice throws, naming both owners.useFeatures()returns the mounted features, typed with the extension.- Permissions. Bind an
IPermissionProviderunderCoreBindings.PERMISSION_PROVIDER:DefaultAuthProviderthen exposescanAccess({ resource, action, record }), so react-admin'suseCanAccessand<CanAccess>work. When not bound, nothing changes: nocanAccess, everything allowed. - Messages.
DefaultI18nProvidermerges each feature's messages per locale under the application'si18nSources. A key two features both define throws. A loader for the initial locale is loaded byArdorApplicationbefore react-admin renders, showingsuspense; other locales load onchangeLocale().
Who is affected
- No one, until they opt in. An application that declares no
features()and binds no permission provider runs as before. - An
AuthProvidersubclass with its own constructor. To getcanAccess, injectCoreBindings.PERMISSION_PROVIDER(isOptional: true) and pass it tosuperas the fourth argument. - Code that implements
IArdorApplicationwithout extending the base class. Addfeatures().