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

I have a problem with permission and role #6720


User avatar
0
GSOFT created

I have a component which contains some services (from other components). When I create a role for user (A), all I want is that user only can access one feature, so I just give A access to that feature. But Like I said the component call some services, so I have to add other premissions for A. This makes A can see other feature. if I did not give A enough permission Any clue could help me?


2 Answer(s)
  • User Avatar
    0
    ryancyq created
    Support Team

    Hi, you can try one of the following approaches

    1. Extend your app service to inject a separate domain manager to handle part of the feature functionalities. So that you dont need to call the app service that requires the entire feature.

    2. Create a separate app service that can perform less functionalities than the app service with the feature. E.g UserAppService and CommonLookUpAppService in ANZ

    https://github.com/aspnetzero/aspnet-zero-core/blob/dev/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Application/Authorization/Users/UserAppService.cs

    https://github.com/aspnetzero/aspnet-zero-core/blob/dev/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Application/Common/CommonLookupAppService.cs

  • User Avatar
    1
    GSOFT created

    Just solved my problem. Creating a new permission and declare it in app-navigation.service