- 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;
8 Answer(s)
-
0
- In the microservice solution, permissions are registered to the permission definition tables by the related microservice when it starts (assuming
PermissionManagementOptions.SaveStaticPermissionsToDatabaseistrue, which is the default). - However, granting those permissions to the
adminrole is not done by every microservice. By design, only the Administration microservice seeds/grants permissions to theadminrole. So it’s expected to see permissions defined/registered, but no rows inAbpPermissionGrantsforadminuntil Administration performs the seeding.
What to do (definitive steps):
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
adminrole automatically (or you can grant them manually in the UI).
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.
(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
IPermissionDataSeederto grant permissions to theadminrole (the same approach referenced in the microservice permission management doc).
- 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
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) - In the microservice solution, permissions are registered to the permission definition tables by the related microservice when it starts (assuming
-
0
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) -
0
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) -
0
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) -
0
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)