Open Closed

Blazor, permissions not updating while still connected #5396


User avatar
0
pierremih created

Hi,

We have an issue related to permissions management on our Blazor front.

How to reproduce :

  • Have a user connected with any permissions

  • Set a new role to the user with new permissions that grant access to a new menu, or the opposite (remove access to functions).

  • Have the user refresh the page. Issue 1 : permissions are not updated and does not have access to the new menus we granted him access to. Issue 2 : If permissions were removed, user can still call APIs that are locked behind said permissions.

  • Have the user disconnect and reconnect. Issue 1 persists (side menus are still hidden). I think we opened a ticket previously for this issue. It was solved in a preview version of LeptonX, which was removed from the NuGet repository. We are now waiting for the final fix that comes out with ABP 7.3. Issue 2 is solved.

  • ABP Framework version: v7.2.3

  • UI type: Blazor

  • DB provider: EF Core

  • Tiered (MVC) or Identity Server Separated (Angular): Idenity Server Separated

  • Exception message and stack trace:


17 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can try these PRs

    Blazor WASM https://github.com/abpframework/abp/pull/16602

    MVC & Blazor Server https://github.com/abpframework/abp/pull/16504

  • User Avatar
    0
    roberto.fiocchi created

    Hi @maliming but how can I use a PR of ABP Framework within my Abp Commercial Solution in which ABP is referenced via nuget package?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    You can copy code from the pr and call it in your project.

  • User Avatar
    0
    roberto.fiocchi created

    That is, I should clone ABP (framework) with the indicated PR and then from the ABP Commercial Solution remove the ABP packages and point directly to the local version DLLs built by the PR. Is it correct?

    The ABP Commercial PRO modules, of which I don't have the sources, that point to ABP's nuget packages will have no problems?

    Thanks for your answer

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    There are only a few classes. You just need to copy these classes to your project.

    https://github.com/abpframework/abp/pull/16504/files

  • User Avatar
    0
    roberto.fiocchi created

    I'll try, but I think I'll get a warning like https://learn.microsoft.com/en-us/dotnet/csharp/misc/cs0436?f1url=%3FappId%3Droslyn%26k%3Dk(CS0436)

    Thanks

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you share the error code screenshot?

  • User Avatar
    0
    pierremih created

    Hi Maliming, Just to clarify that Roberto is not part of our team and that he is asking about a separate problem in this thread. We are getting notified for it and it is confusing. I don't think we need to ask Roberto to create a separate issue but I will leave the decision up to you.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Sorry for that @pierremih

    hi @roberto.fiocchi@mcsi.it you can consider creating a new question. Thanks

  • User Avatar
    0
    pierremih created

    Hi @maliming We updated to ABP 7.3, which includes the PR you linked. Can you confirm that point. The issue hasn't been solved and persists.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi pierremih

    Blazor wasm or blazor server?

  • User Avatar
    0
    pierremih created

    It's blazor server

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    ok, I will confirm that.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    The ApplicationConfigurationDtoCacheAbsoluteExpiration of AbpAspNetCoreMvcClientCacheOptions is 300 seconds by default.

    You can consider changing it to shorter. eg: 3 seconds.

  • User Avatar
    0
    pierremih created

    Interesting, we will try that

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    ok

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

Made with ❤️ on ABP v9.1.0-preview. Updated on December 12, 2024, 07:15