Open Closed

Feature system and Permissions #5659


User avatar
0
lszabados@consult2000.hu created

Hello,

I use the Feature system. My problem is the following and I would like some ideas / advice.

Among the permissions, there are some that belong to a function that is controlled by permissions under the Feature system.

How can I hide the privilege choices if the feature is not active?

Best Regards,

L.

  • ABP Framework version: v7.3.0
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

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

    Hi,

    You can declare the feature they need when defining permissions.

    For example:

    var myGroup = context.AddGroup("MyGroup", L("Permission:MyGroup"));
    
    var permission = myGroup.AddPermission("Test", L("Permission:Test")).RequireFeatures(.....);
    
Made with ❤️ on ABP v9.1.0-preview. Updated on December 05, 2024, 12:19