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.

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

3 Answer(s)
  • User Avatar
    0
    liangshiwei created
    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

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    adam-dot-cohen created

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

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    liangshiwei created
    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.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 28, 2026, 11:44
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.