Open Closed

Admin User Default Permission Data Seeding #5207


User avatar
0
adam-dot-cohen created

ABP Framework version: v7.2.1 UI type: Blazor Server DB provider: EF Core Tiered (MVC) or Identity Server Separated (Angular): Tiered, separate OpenIddict server

Which module(s) are responsible for seeding the default admin permissions (e.g. AbpPermissionGrants)? In other words, can you point me to the PermissionDefinitionProvider(s) that are required to seed the default permissions for the ADMIN login? Specifically for the following...

  • AbpIdentity
  • AbpAccount
  • FeatureManagement
  • SettingManagement
  • Saas
  • OpenIddictPro
  • AuditLogging
  • LanguageManagment
  • TextTemplateManagement

I need to know which project dependencies (Domain, Domain.Shared, etc...) would be necessary with "DEPENDSON" attributes in EntityFrameworkCore/DBMigrator to seed the tables outside of the standard template.


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

    Hi,

    We have a data seed system: https://docs.abp.io/en/abp/latest/Data-Seeding

    The permission module implements the IDataSeedContributor interface to grant permissions to admin user.

    https://github.com/abpframework/abp/blob/dev/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/PermissionDataSeedContributor.cs

  • User Avatar
    0
    adam-dot-cohen created

    Where are the definitions stored that get created upon seed? Examples from AbpPermissionGrants...

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Sorry, but can you explant it in detail? Thanks.

    I need to know which project dependencies (Domain, Domain.Shared, etc...) would be necessary with "DEPENDSON" attributes in EntityFrameworkCore/DBMigrator to seed the tables outside of the standard template.

    Dbmigrator is the smallest seeding program, you can refer to it.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 01, 2024, 05:35