Use
var l = context.GetLocalizer<MyProjectNameResource>();
to replace
var l = context.ServiceProvider.GetRequiredService<IStringLocalizer<MyProjectNameResource>>();
Remove
var authorizationService = context.ServiceProvider.GetRequiredService<IAuthorizationService>();
and use
if (await context.IsGrantedAsync(xxx))
to replace
if (await authorizationService.IsGrantedAsync(xxx))
Use
var l = context.GetLocalizer<MyProjectNameResource>();
to replacevar l = context.ServiceProvider.GetRequiredService<IStringLocalizer<MyProjectNameResource>>();
Remove
var authorizationService = context.ServiceProvider.GetRequiredService<IAuthorizationService>();
and useif (await context.IsGrantedAsync(xxx))
to replaceif (await authorizationService.IsGrantedAsync(xxx))
See: https://github.com/abpframework/abp/pull/4084/files#diff-60c6161a5603c35f37e13d7368797f30