Base solution for your next web application
Open Closed

Restricting Features for Tenants #2396


User avatar
0
joshboilered created

Hello,

I've added a menu item to the AppNavigationProvider called 'Reporting'. Under AppFeatureProvider, I've added a new feature called 'Reporting'. Both the feature in the list of features and the navigation menu are displaying 'Reporting'. I've created a new edition called 'Standard + Reporting'. When I setup a new Tenant, I assign this edition to them.

My question is;

How do I restrict the menu item 'Reporting' from displaying in the Navigation if the Tenant is not assigned to the above edition? Is there a parameter in AppNavigationProvider like there is for permissions? I can't find in the documents how you implement features in the UI, only in the controller. Thanks.

e.g.

.AddItem(new MenuItemDefinition(
AppPageNames.Tenant.Reporting,
L("Reporting"),
url: "App/Reporting/Index",
icon: "fa fa-excel-o",
requiredPermissionName: AppPermissions.Pages_Tenant_Reporting,
requiredFeatureName: AppFeature.Pages_Tenant_Reporting
)
)


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Can you try this ?

    requiredPermissionName: AppPermissions.Pages_Tenants,
    featureDependency: new SimpleFeatureDependency(true, "NameOfFeature")