Open Closed

Lepton Theme in multi tenant application #1644


User avatar
0
peter.lach created

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


4 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    I will check it out.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    I can't reproduce the problem, can you provde steps to reproduce? thanks.

  • User Avatar
    0
    peter.lach created

    Hi liangshiwei,

    Here is link to pdf file explaining steps to reproduce.

    https://drive.google.com/file/d/1kHH16PMnHnxrsqYhrDoqNOZYOG6dUAnY/view?usp=sharing

    Thanks

    Peter

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Sorry, but the PDF not helpful. I still can't reproduce the problem, can I check it remotely? shiwei.liang@volosoft.com

Made with ❤️ on ABP v9.1.0-preview. Updated on November 18, 2024, 05:54