- ABP Framework version: v7.3.2
- UI Type: Angular
- Database System: EF Core (SQL Server)
- Tiered (for MVC) or Auth Server Separated (for Angular): Separated
One of our tenant wants to have roles with a different language. We tried to do this by changing the role names in that tenant's database, leaving the normalised name intact. We need to leave the normalised name intact so we can still seed role permissions normally. This did not work, however, because permission grants reference the role table with the role name, not the normalised name or id. Why is that, and can this be changed, in order to support the role name localisation?
7 Answer(s)
-
0
hi
This may be because no normalized role name or id is stored in current claims.
You can change this but the framework does not consider changing it because this will bring huge breaking changes.
https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/Permissions/RolePermissionValueProvider.cs#L47 https://github.com/abpframework/abp/blob/dev/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/index.js#L40
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Ok, how about customizing the roles page so it would use the normalised name as localisation key. Then in that tenant, the role names could be visualised in a different language. Is this something we could easily do by just replacing the one page or do we need to pull the whole identity pro module to our sources?
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
hi
You can add it by
extra propertyor download and customise the source code.then override the default UI to show the displayname instead of name.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Yes.
See: https://support.abp.io/QA/Questions/160/How-to-customize-an-ABP-project https://docs.abp.io/en/abp/latest/UI/Angular/Component-Replacement
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)