Starts in:
0 DAY
2 HRS
46 MIN
49 SEC
Starts in:
0 D
2 H
46 M
49 S
Open Closed

First Post and need help with commercial modules #4825


User avatar
0
Navneet@aol.com.au created

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v7.0.3
  • UI type: Angular / MVC / Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Hello support team and other ABP users,

I have tried my level best to first search below issues but could not find solutions, I am a new developer so if any question is silly then sorry

Could you please help me with below:

  1. After I create a new Module via ABP Suite with UI, the Suite create all necessary CRUD pages, model, DTO and repositories, however when I change anything manually, for example N-2-N relationship it creates only one side of UI and I manually create another side, the suite change the code back to default if I re-run the same entity generation. I believe I can get around by creating partial class, but as suite create a lot of classes in domain, efcore, application, applicationcontracts... I end up some errors with referring partial classes in repositories. IS it ok if you can provide a sample of book entity created via suite and using partial class. I believe that will be helpful for other community member looking for similar solution.

  2. When I create a new application via suite and add Volo.Docs and Volo.Payment via suite, they are not part of Feature under Editions settings, but both are available under Role --> Permissions, can you please help me, how can I add them to Edition --> Features (can you please suggest any code I can override related class instead of changing source code, as I don’t have access to source code dueto my license)

  3. Regarding ABP.Volo.Payment, why tenant has permission to create plan or update plan by default. I am just trying to understand what is the logic to allow tenant to change plans created by host. Is it to allow my tenants to set their own payment Payment Gateway so my tenant can issue their own invoice and received payment from their customers, like B2B2C

  4. As I don’t have access to all commercial sourcecode due to license level, how can I override to make changes to base class, please code sample of only three, rest of classes I will figureout Replace OpenIddictApplication.cs with myOpenIddictApplication.cs Replace OpenIddictDbContextModelCreatingExtensions.cs with myOpenIddictDbContextModelCreatingExtensions.cs last, I want to replace AbpOpenIddictProPermissionDefinitionProvider.cs with my myAbpOpenIddictProPermissionDefinitionProvider

  5. When I publish my project, I noticed that appsettings.secrets.json is also in published folder, is it safe to give it to my client while hand overing the finished Application

  6. When I create a MVC Application with public page & CMS (identity & HostApi not separate), the public page does not use API but use database directly, how can I make it use API instead of interacting with DB directly (please note, I don’t want to have separate Identity & HostApi)

  7. MVC public page, in responsive mode, I don’t see login button, it’s hidden, can you please help me, how can I fix it? Screenshot attached:

Is there anyplace like GitHub, can I read Commercial Module change log for example - CRMpro module changes from 7.0.1 to 7.0.3, this will help me to plan before migrating to next version.

Please let me know if anything not clear and I will try to give more details Regards, Navneet


57 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Shared.

    Also, Instead of using my MainApp to create your suggested navigation, do you think, I can create in a ABP custom Module for above custom changes, then use it as plugin Module.

    I think it would be ok, but you should not use my code 100%, because it is just a simple example to give you an idea

    Request: Could you please explain how exactly your suggested code works?

    I have explained it in detail in my previous answer : ), however, you can check the source code I shared.

  • User Avatar
    0
    Navneet@aol.com.au created

    Hi liangshiwei,

    I have reviewed your code suggestion, however the authorisation logic does not work, to reproduce the issue:

    Create a new user as: Username: test@test.com password: 1q2w3E*

    Create a new Application Go to OpenID -> Application Create new Application ClientID: DemoWebApp DisplayName: Demo App Client Secret: 1q2w3e* Select all Scopes Select Checkbox of "Allow Password Flow"

    In postman, https://localhost:xxx/connect/token client_id: DemoWebApp client_secret:1q2w3e* scope:roles phone grant_type:password username:test@test.com password:1q2w3E*

    You will notice that, even though, application wasn't assigned to User, user is able to get access token, where as, desired outcome should be Access Denied

    Could you please suggest, what can I do to get it work

    Regards, Navneet

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    The code of the authorized endpoint is open source. https://github.com/abpframework/abp/blob/dev/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo/Abp/OpenIddict/Controllers/TokenController.cs

    You can override the TokenController to check if the user is allowed to use the application: https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Overriding-Services#example-overriding-a-controller

  • User Avatar
    0
    Navneet@aol.com.au created

    Thanks Liangshiwei,

    Token was only one example, do I need to override any other controller to control the access of users to the application.

    Regards, Navneet

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi

    There two controllers you need to customize:

    • TokenController
    • UserinfoController

    I think this is enough. You can give it try.

    As I said , the core functionality of openiddict module is open source: https://github.com/abpframework/abp/tree/dev/modules/openiddict You can override any service you want.

  • User Avatar
    0
    Navneet@aol.com.au created

    Hi,

    In your code suggestions what is the reason to use Ignore(), see below

    Add automapper config:

    CreateMap<OpenIddictApplication, ApplicationDto>() .ForMember(des=>des.Scopes,src =>src.Ignore()) .ForMember(des=>des.PostLogoutRedirectUris,src =>src.Ignore()) .ForMember(des=>des.RedirectUris,src =>src.Ignore());
    

    So far I didn’t have success to configure user permission.

    If any other user have manage to achieve it, then please share, otherwise all good to close this ticket

    Regards Navneet

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    In your code suggestions what is the reason to use Ignore(), see below

    Because those attributes type of the class are inconsistent, so it needs to be ignored

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06