Browse Source

Merge branch 'rel-3.3' of https://github.com/abpframework/abp into rel-3.3

pull/5937/head 3.3.0-rc.2
erolarkat 6 years ago
parent
commit
80118b2a31
  1. 8
      npm/ng-packs/packages/core/src/lib/utils/initial-utils.ts
  2. 5
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyProjectNameBlazorModule.cs

8
npm/ng-packs/packages/core/src/lib/utils/initial-utils.ts

@ -62,8 +62,8 @@ export function registerLocale(locale: string, injector: Injector): Promise<any>
return new Promise((resolve, reject) => {
return import(
/* webpackChunkName: "_locale-[request]"*/
/* webpackInclude: /\/(ar|cs|en|fr|pt|tr|ru|sl|zh-Hans|zh-Hant).js/ */
/* webpackExclude: /\/global|\/extra/ */
/* webpackInclude: /[/\\](ar|cs|en|fr|pt|tr|ru|hu|sl|zh-Hans|zh-Hant).js/ */
/* webpackExclude: /[/\\]global|extra/ */
`@angular/common/locales/${cultureNameLocaleFileMap[locale] || locale}.js`
)
.then(module => {
@ -101,7 +101,9 @@ async function defaultLocalErrorHandlerFn({
}
if (isDevMode) {
console.error(`Cannot find the ${locale} locale file. You can check how can add new culture at https://docs.abp.io/en/abp/latest/UI/Angular/Localization#adding-new-culture`);
console.error(
`Cannot find the ${locale} locale file. You can check how can add new culture at https://docs.abp.io/en/abp/latest/UI/Angular/Localization#adding-new-culture`,
);
}
resolve();

5
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyProjectNameBlazorModule.cs

@ -3,6 +3,7 @@ using System.Net.Http;
using Blazorise;
using Blazorise.Bootstrap;
using Blazorise.Icons.FontAwesome;
using IdentityModel;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
@ -71,7 +72,11 @@ namespace MyCompanyName.MyProjectName.Blazor
builder.Services.AddOidcAuthentication(options =>
{
builder.Configuration.Bind("AuthServer", options.ProviderOptions);
options.UserOptions.RoleClaim = JwtClaimTypes.Role;
options.ProviderOptions.DefaultScopes.Add("MyProjectName");
options.ProviderOptions.DefaultScopes.Add("role");
options.ProviderOptions.DefaultScopes.Add("email");
options.ProviderOptions.DefaultScopes.Add("phone");
});
}

Loading…
Cancel
Save