- ABP Framework version: v7.3.2
- UI Type: MVC
- Database System: EF Core (SQL Server)
- Tiered (for MVC) or Auth Server Separated (for Angular): yes
- Exception message and full stack trace:
- Steps to reproduce the issue:
Hi ,
we are using ABP now as Authentication and Authorization service (IAM or Auth-Server) , as we are attaching more and more services to this Auth-Server we need to generate permissions according to these services , so we need a mechanism to generate permission on start up for each service, save these permissions on Auth-Server.
is there anyway to do that , we already try to add these permissions to "abppermissions" table but it dose not work and Auth-server dose not list it on the permission list
advice plz
5 Answer(s)
-
0
Hi,
Abp supports dynamic permissions, you can see this issue: https://github.com/abpframework/abp/pull/13644
Other services will save permissions to the database at runtime.
You need the following configuration in the auth server:
Configure<PermissionManagementOptions>(options => { options.IsDynamicPermissionStoreEnabled = true; });
The auth server application will read the database at startup.
There are some preconditions for using this function
- You need to use Redis and use the same configuration(
KeyPrefix
).
- You need to use Redis and use the same configuration(
-
0
-
0
Hi,
Could you share the full steps to reproduce the problem?
It's better if you can share a simple project that can reproduce the problem shiwei.liang@volosoft.com I will check it.
-
0
it is simple, just create an MVC Tired solution with SQL entity framework ,
then add any permission to the table AbpPermissions , and restart your application (web) and there are no permission in the list
-
0
Hi,
You should add a dynamic permission group and add sub-permissions to it.
For example:
For MVC Tired, the web project loads permissions from remote(HttpApi.Host).
You need to empty the Redis cache(or restart the HttpApi.host project), wait for 30 seconds, and you will see the dynamic permissions.