Open Closed

Starting a micro-service template solution, missing permission grants on Language service and AIManagement service #10573


User avatar
0
trendline created
  • Template: microservice
  • Created ABP Studio Version: 2.2.4
  • Current ABP Studio Version: 2.2.4
  • Multi-Tenancy: Yes
  • UI Framework: mvc
  • Theme: leptonx
  • Theme Style: system
  • Theme Menu Placement: side
  • Database Provider: ef
  • Database Management System: sqlserver
  • Mobile Framework: maui
  • Public Website: Yes
  • Social Login: Yes
  • Include Tests: Yes
  • Dynamic Localization: Yes
  • Kubernetes Configuration: Yes
  • Grafana Dashboard: Yes
  • Use Local References: No
  • Aspire: No
  • Optional Modules:
    • GDPR
    • TextTemplateManagement
    • AuditLogging
    • OpenIddictAdmin
  • Selected Languages: Chinese (Simplified), Chinese (Traditional), English
  • AI Management Enabled: Yes
  • Selected AI Providers: Ollama, OpenAI
  • Default Language: Chinese (Simplified)
  • Exception message and full stack trace: After initial running the solution, Language Management Module and AI Management Module permissions not seeded the initialed permission grants in database
  • Steps to reproduce the issue: 1, running all services; 2, running web gateway; 3, running web app; 4 running auth server app; 5, browse the web app;
Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

8 Answer(s)
  • User Avatar
    0
    AI-Bot created
    Support Team ABP Agent
    • In the microservice solution, permissions are registered to the permission definition tables by the related microservice when it starts (assuming PermissionManagementOptions.SaveStaticPermissionsToDatabase is true, which is the default).
    • However, granting those permissions to the admin role is not done by every microservice. By design, only the Administration microservice seeds/grants permissions to the admin role. So it’s expected to see permissions defined/registered, but no rows in AbpPermissionGrants for admin until Administration performs the seeding.

    What to do (definitive steps):

    1. Start/restart the Administration microservice

      • After you first run everything (or after enabling new modules like Language Service / AI Management), restart Administration.
      • On restart, Administration will grant newly discovered permissions to the admin role automatically (or you can grant them manually in the UI).
    2. If you are using Redis/distributed cache, clear it

      • In microservice solutions, permission definition/grant info is cached. If you don’t see the new permission groups in the UI (Role Permissions dialog) even after restart, clear Redis (or your configured distributed cache), then restart the services again.
    3. (Optional, if you want it always automatic per service) Create a data seeder that uses IPermissionDataSeeder

      • If you want LanguageService and AIManagement service permissions to be auto-granted without relying on restarting Administration, add a custom data seeder in the appropriate service and call IPermissionDataSeeder to grant permissions to the admin role (the same approach referenced in the microservice permission management doc).

    Links (validated):

    • https://abp.io/docs/10.2/solution-templates/microservice/permission-management
    • https://abp.io/docs/10.2/solution-templates/microservice/localization-system
    • https://abp.io/docs/10.2/modules/ai-management/

    This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.

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

    Resolved, it caused by the redis cache, after clear it, resolved this issue.

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

    I think it is a odd and uncertain issue, it occurs offenly

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    After initializing the database for the first time and starting all the applications, some permissions might not be added. You can manually grant all permissions to the admin role.

    Thanks.

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

    Is there a way to grant the missed permissions manually? insert to database directly?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You only need to do this after the initial new databases, after that, you won't have any issues with permissions.

    It's also random—it depends on the order in which the servers start up or whether any errors occur during the process. If there are errors, it will retry, and then automatically handle the issues mentioned above.

    Thanks.

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

    by this post, another issue I think it is related with this, you can let your team take an investigation on it. when initial the AIManangment module(in micro-service template it is a service), the related select2 component dropdown will blocked on the UI, effect the data already retrieved via the api calling, below are the UI issue

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    ok. Let's move to the https://abp.io/support/questions/10603/Duplicating-rendered-select-drop-down-controls-in-Razor-MVC-after-upgrade-to-102#answer-3a20b244-5b79-9d23-190c-8f536dbfb7aa

    Thanks.

    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 16, 2026, 14:50
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.