Activities of "jmalla.cp"

  • ABP Framework version: v6.0.1
  • UI Type: MVC
  • Database System: EF Core (PostgreSQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): Tiered
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

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.

  • Basic permissions can't achieve this because the are applied per user
  • Features can't achieve this because they are applied globally or per tenant

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

Answer

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

Answer

Hi,

After restarting the application, the problem persists

Question
  • ABP Framework version: v6.0.1
  • UI Type: MVC
  • Database System: EF Core (PostgreSQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): Tired
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

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

Showing 1 to 10 of 80 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 20, 2025, 18:00