Hi,
We have an aplication to manage farms and their pig breedings. The farmer can see one or more farms, and inside each farm, they can see one or more breedings.
I would like to hide some menu items depending on wich farm or breeding the farmer has selected.
I'm trying to add a dynamic claim when the farmer select a farm and breeding to apply a specific permission, but I can't find any information on how to configure dynamic claims and use custom authorization policies.
Could some one help me?
Thanks
Yes, you are right.
Sorry, I had changed the value in the wrong place on the web, in the Standard Editions Features. Now, I have changed the value in "Manager Host Features" and that's correct.
Please, cloud you tell me how I can block the login, using the feature loginEnabled and if role is not admin?
Thanks
Hi,
After restarting the application, the problem persists
Hi,
I'm trying to configure a new feature with FeatureDefinitionProvider like this:
public class WebAppFeatureDefinitionProvider : FeatureDefinitionProvider
{
public override void Define(IFeatureDefinitionContext context)
{
var myGroup = context.AddGroup("WebApp");
myGroup.AddFeature(
WebAppFeatures.LoginEnabled,
defaultValue: "true",
displayName: L("LoginEnabled"),
valueType: new ToggleStringValueType()
);
myGroup.AddFeature(
WebAppFeatures.BackgroundJobEnabled,
defaultValue: "true",
displayName: L("BackgroundJobEnabled"),
valueType: new ToggleStringValueType()
);
}
private static LocalizableString L(string name)
{
return LocalizableString.Create<WebAppResource>(name);
}
}
These two features are enabled to allow changes to the value from the web frontend. I can change the value, and it is also updated in the database.
But when I try to get the value, like this:
var backgroundJobEnabled = await _featureChecker.GetOrNullAsync(WebAppFeatures.BackgroundJobEnabled);
var loginEnabled = await _featureChecker.GetOrNullAsync(WebAppFeatures.LoginEnabled);
The value always is true
Can someone helps me?
Thanks
Hi,
Your solution works.
Thanks
Hi EngincanV,
Have you acced the code?
I have just send again. Tell me if you have recived it
Could anyone help me with this issue?
The name of the project is Cincaporc.WebApp and the branch is development-dotnet8
I have sent you an invitation to my project