Hi liangshiwei,
Here is link to pdf file explaining steps to reproduce.
https://drive.google.com/file/d/1kHH16PMnHnxrsqYhrDoqNOZYOG6dUAnY/view?usp=sharing
Thanks
Peter
Hi,
I'm currently having issue with lepton theme that I use in multi tenant application. The issue is related to feature management.
Application is setup with custom feature definition provider that adds new feature flag.
var appFeatureGroup = context.AddGroup("AppFeatures", displayName: LocalizableString.Create<AppResource>("AppFeatures"));
appFeatureGroup.AddFeature(
"Feature1.Enable",
defaultValue: "false",
displayName: LocalizableString.Create<AdminResource>("Feature1Module"),
valueType: new ToggleStringValueType()
);
I then look for this feature in module menu contributor so I can build the menu according to tenant enabled features.
var featureChecker = context.ServiceProvider.GetRequiredService<IFeatureChecker>();
if (await featureChecker.IsEnabledAsync("Feature1.Enable"))
{
if (context.Menu.Name == StandardMenus.Main)
{
await ConfigureMainMenuAsync(context);
}
var moduleMenu = AddModuleMenuItem(context);
}
The issue I'm facing is, when a tenant is logged in into the application, the menu won't update according to feature flag unless tenat saves Lepton Theme settings. User doesn't need to make any changes to the the theme only pressing the save button is enough for the menu to be re-build looking at the feature flags.
The feature flag is controled by the host using feature management.
Please advise, thank you
Peter