I want my tenants to be able to select and deselect features. I have three questions.
- This seems a very convoluted way of adding features for a tenant:
if (input.WantsDocumentationManagement == true)
{
var updatablefeatureValues = ObjectMapper.Map<List<Abp.NameValue>>(await TenantManager.GetFeatureValuesAsync(tenant.Id));
foreach (var feature in updatablefeatureValues)
{
if (feature.Name == "App.DocumentationManagement")
{
feature.Value = "true";
}
}
await TenantManager.SetFeatureValuesAsync(tenant.Id, updatablefeatureValues.Select(fv => new NameValue(fv.Name, fv.Value)).ToArray());
}
Is this best practise or is there a better way?
- I have read that features are cached. Is this change immediately available in the UI?
- Why is the font muted in list items?
4 Answer(s)
-
0
Hi @bobingham,
- There is also
SetFeatureValueAsync
method on TenantManager which you can use. - If you use TenantManager, yes, the cache is updatead.
- Could you share the screenshot where this happens ?
- There is also
-
0
It's a non-standard implementation. Everyone goes on a seven day free-trial. During the free trial they are limited to three devices connected to the system. They can upgrade at any time and can choose to use the document management system or not at any time. The login process is modified to check the trial and grace periods. A message is displayed at sign in during the trial and grace periods asking the user if they want to begin a paid subscription. If they do the the system takes them to the Stripe payment page for an initial payment. After they have paid they may add more devices to the system. We have a function app in Azure which checks the database every night for expiring subscriptions. It calculates device usage and document management system usage, takes a payment from Stripe. It then updates the Zero database, connects to the Zero app and sends a notification. The tenant's subscription page will be modified to give estimated costs and to allow the user to switch on and off features we want to add such as the document management system. Which screen shot do you want to see? This a mock up of the select-editions page which will be implemented on a different web site.
-
0
I mean this;
Why is the font muted in list items?
-
0