Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Assign permissions to default tenant from separated module #510


User avatar
0
byteplatz created

Hello,

We are using aspnetzero to develop a distributed system based on SOA, DDD and CQRS principles together with NServiceBus ([http://www.particular.net])).

We are using the approach of separated module for each SOA Service.

We have a main app (aspnet zero code with few customizations). We have a service module (based on [https://github.com/aspnetboilerplate/sample-blog-module])).

Each service is meant to be autonomous and the separated sample blog module seems to be a perfect fit for that.

Next step for us is to come up with a solid approach for configuring permissions. We already have a separated module adding permissions (and they are appearing fine in main app).

We are using the default tenant as the 'Test' tenant for internal use and test of features before they are released to customers.

The question here is : What is the best approach to add service module permissions (from separated solution) to default tenant roles ?

I mean, we dont have the Context from main app inside the sercie module (and we dont find it right indeed).

Ideas/Recommendations ?

Cheers

Bruno Bertechini


3 Answer(s)
  • User Avatar
    0
    byteplatz created

    The first idea that came up was create a shared interface for example ICreatePermissionsForDefaultTenant and use main app DefaultTenantRoleAndUserCreator seed to execute the code from several modules.

    The same apply for menus created by the separated module...And I thinkg other things will benefit for the given approach as well. Thus, main app does not know about the service module but still can add permissions, menus and such into the database.

    Bruno

  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    After reading your first post, I thought the same idea you described in the second post. So, a common interface and module implementation seems fine.

    Thanks.

  • User Avatar
    0
    byteplatz created

    Thanks Halil,

    I will implemente like that !

    Regards

    Bruno