Activities of "mattw@agilenova.com"

Answer

Hello,

I second the request for a working example for Dynamic Claims. I have followed the instructions to enable dynamic claims in HttpApi.Host, but am at a loss as to how to get this to work in the Angular front end.

In my case, the ABP backend (with the embedded OpenIddict auth server) changes the user's role based on payment for a subscription. The issue is that the ABP front-end, which uses Angular, has a JWT token with the old role and the token doesn't reflect the change until I logout and log back in. The documentation indicates that the user role is a dynamic claim but I am not sure how this works.

Please provide an example or additional documentation on how Dynamic Claims can be enabled with an Angular front end.

Thank you!

Matt, would you be willing to share your implementation here? Thank you!

Sorry, I can only share code snippets. It's a project for a client (NDA).

Answer

Hi, I just tried calling the application-configuration endpoint from postman before and after a role change, but the auth / grantedPolicies are not changing. I'm running ABP 8.0.2 commercial.

"auth": { "grantedPolicies": { }

If I restart HttpApi.Host, the grantedPolicies are updated.

I followed the instructions to upgrade my code in XXXHttpApiHostModule.cs: private void ConfigureAuthentication(ServiceConfigurationContext context) { context.Services.ForwardIdentityAuthenticationForBearer(OpenIddictValidationAspNetCoreDefaults.AuthenticationScheme); // Enable dynamic claims context.Services.Configure<AbpClaimsPrincipalFactoryOptions>(options => { options.IsDynamicClaimsEnabled = true; //options.RemoteRefreshUrl = configuration["AuthServerUrl"] + options.RemoteRefreshUrl; }); }

... app.UseUnitOfWork(); app.UseDynamicClaims(); app.UseAuthorization();

Please advise.

Answer

Hello,

I second the request for a working example for Dynamic Claims. I have followed the instructions to enable dynamic claims in HttpApi.Host, but am at a loss as to how to get this to work in the Angular front end.

In my case, the ABP backend (with the embedded OpenIddict auth server) changes the user's role based on payment for a subscription. The issue is that the ABP front-end, which uses Angular, has a JWT token with the old role and the token doesn't reflect the change until I logout and log back in. The documentation indicates that the user role is a dynamic claim but I am not sure how this works.

Please provide an example or additional documentation on how Dynamic Claims can be enabled with an Angular front end.

Thank you!

That worked perfectly! Thanks

When User A accesses the File Management component in the Angular UI, User A can see files and directories created by User B.

I want to restrict User A to just User A's files and I tried applying an AbpQueryFilter, but it is not working. I use this approach with my own/custom entities successfully, but the filter has no effect on ABP module entities.

I specifically modified MyAppDbContext.cs as follows: protected override void OnModelCreating(ModelBuilder builder) { //..... generated code .... // --- custom code ----

 builder.Entity&lt;FileDescriptor&gt;(b =>
{
    b.HasAbpQueryFilter(t =>  (t.CreatorId.Value == _currentUser.Id);
});
    

builder.Entity&lt;DirectoryDescriptor&gt;(b =>
    {
       b.HasAbpQueryFilter(t =>  (t.CreatorId.Value == _currentUser.Id);
    });

NOTE: _currentUser is CurrentUser injected.

  • ABP Framework version: v7.4.5
  • UI Type: Angular
  • Database System: EF Core PostgreSQL,
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace: n/a
  • Steps to reproduce the issue: Use the File Management Component in Angular UI

Please advise. Thanks!

This is exactly what I needed. Thank you!

  • ABP Framework version: v7.4.2
  • UI Type: Angular
  • Database System: EF Core (PostgreSQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no

I am using the LeptonX commercial theme and would like to add an option to the User Menu - the menu accessed by clicking the person icon (with LInked Accounts, My Account, etc.). Do I use a routes patch, add a navItem, or replace the layout? Please provide an example or code snippet.

Thank you!

Hello Anjali,

Yes, I checked that link but it does not describe the use of the Angular module or any Angular related configuration or guidelines.

I am using ABP Angular, not MVC, and was happy to find the @volo/abp.ng.payment feature extension but could not find any documentation on how to configure it. Please provide any related documentation or guidelines.

Thank you, Matt

Hello,

Is there any documentation or can you provide information on how to install and configure the @volo/abp.ng.payment feature library in ABP 7.3.3 / Angular?

I found references to the package at https://abp.io/package-detail/@volo_abp.ng.payment and am hoping for help with installation of the feature library ( https://docs.abp.io/en/abp/latest/UI/Angular/Feature-Libraries). Please help with tips on app.module.ts and app-routing.module.ts entries required to install the feature library properly.

My goal is to install and configure the ABP Payment module within Angular.

  • ABP Framework version: v7.3.3
  • UI Type: Angular
  • Database System: EF Core PostgreSQL
  • Tiered (for MVC) or Auth Server Separated (for Angular): No

I wasn't sure how to resolve the issue (above) in 7.1.1 and upgraded the project to ABP 7.2.1. Angular UI generation is working in ABP 7.2.1 so far.

Showing 11 to 20 of 39 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11