nettoyages
This commit is contained in:
@ -117,7 +117,7 @@
|
|||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<data name="About"><value>À propos de</value></data>
|
<data name="About"><value>À propos de </value></data>
|
||||||
<data name="About BookAStar"><value>À propos de BookAStar</value></data>
|
<data name="About BookAStar"><value>À propos de BookAStar</value></data>
|
||||||
<data name="About Message"><value>Bienvenue chez vos stars.</value></data>
|
<data name="About Message"><value>Bienvenue chez vos stars.</value></data>
|
||||||
<data name="access denied"><value>Accès refusé</value></data>
|
<data name="access denied"><value>Accès refusé</value></data>
|
@ -28,6 +28,12 @@
|
|||||||
<dd>
|
<dd>
|
||||||
@Html.DisplayFor(model => model.RedirectUri)
|
@Html.DisplayFor(model => model.RedirectUri)
|
||||||
</dd>
|
</dd>
|
||||||
|
<dt>
|
||||||
|
@Html.DisplayNameFor(model => model.ApplicationID)
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
@Html.DisplayFor(model => model.ApplicationID)
|
||||||
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
@Html.DisplayNameFor(model => model.Secret)
|
@Html.DisplayNameFor(model => model.Secret)
|
||||||
</dt>
|
</dt>
|
||||||
|
@ -14,17 +14,24 @@
|
|||||||
},
|
},
|
||||||
"Site": {
|
"Site": {
|
||||||
"Title": "Yavsc",
|
"Title": "Yavsc",
|
||||||
|
"Slogan":"Yavsc!",
|
||||||
|
"Authority": "http://127.0.0.1:5000/",
|
||||||
|
"Audience": "http://127.0.0.1:5000/",
|
||||||
"Owner": {
|
"Owner": {
|
||||||
"Name": "Paul",
|
"Name": "[query]",
|
||||||
"Address": "paul@pschneider.fr"
|
"Address": "bigchief@company.com"
|
||||||
},
|
},
|
||||||
"Admin": {
|
"Admin": {
|
||||||
"Name": "Paul",
|
"Name": "[answer]",
|
||||||
"Address": "contact@pschneider.fr"
|
"Address": "contact@company.com"
|
||||||
},
|
},
|
||||||
"UserFiles": {
|
"UserFiles": {
|
||||||
"RootDir": "UserFiles",
|
"RootDir": "UserFiles",
|
||||||
"Quota": "200M"
|
"Quota": "200M"
|
||||||
|
},
|
||||||
|
"DirNames": {
|
||||||
|
"Bills":"Bills",
|
||||||
|
"Blog":"Blog"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Smtp": {
|
"Smtp": {
|
||||||
|
@ -9063,7 +9063,7 @@
|
|||||||
},
|
},
|
||||||
"MailKit/1.3.0-beta7": {
|
"MailKit/1.3.0-beta7": {
|
||||||
"type": "package",
|
"type": "package",
|
||||||
"sha512": "xO66P+XLWyo3/POInJpkCsA0bFI3XmDxsdR+rSXCm9d7kbPU6kFBgvXT4AxW0TaWYUcsaxJEcZdhMgOODWu/ew==",
|
"sha512": "LalD+6uE97WdfZ9Ohmz2ZeYbPXzql4VNazGO/e9PLMENKNPwENc4eSr8v/r+mHY3EsRsAH34DCkub8rA4Zwyrw==",
|
||||||
"files": [
|
"files": [
|
||||||
"lib/dotnet5.5/MailKit.dll",
|
"lib/dotnet5.5/MailKit.dll",
|
||||||
"lib/dotnet5.5/MailKit.xml",
|
"lib/dotnet5.5/MailKit.xml",
|
||||||
@ -9088,7 +9088,7 @@
|
|||||||
},
|
},
|
||||||
"MarkdownDeep.NET/1.5.0": {
|
"MarkdownDeep.NET/1.5.0": {
|
||||||
"type": "package",
|
"type": "package",
|
||||||
"sha512": "Y0vPM1u1nNtNhTVI6lZPr80W3PlTJZROmc7oqvjg85XVzVjlZX1Cp5+yOuz+qHa264JosYjzGAiBUQuWdnBeZg==",
|
"sha512": "8UPmeM6TB0ut7EKBd+uA7bY988SN+C9NxKiNqLrlUZrGZQQGiQzomeIm33uyvLJ1Umm23mdf7/fe204AOhYMMw==",
|
||||||
"files": [
|
"files": [
|
||||||
"lib/net451/MarkdownDeep.dll",
|
"lib/net451/MarkdownDeep.dll",
|
||||||
"MarkdownDeep.NET.1.5.0.nupkg",
|
"MarkdownDeep.NET.1.5.0.nupkg",
|
||||||
@ -10985,7 +10985,7 @@
|
|||||||
},
|
},
|
||||||
"MimeKit/1.3.0-beta7": {
|
"MimeKit/1.3.0-beta7": {
|
||||||
"type": "package",
|
"type": "package",
|
||||||
"sha512": "vWNZ2pDJXTFRHiErdZW6bOPej+sikIOjf8LlZSSiZXgYE2s4raQeHVQtvyGVpoQvx/PKXKoACzJDCkm9hr/OQQ==",
|
"sha512": "M7F4OnPXfcI4AljQUdvok29vz3DEruiqIBDIn6zGVdFQpNpaVbmrp80YLX9SH2hJO+8fSOX6/k3ScUXqZheFSQ==",
|
||||||
"files": [
|
"files": [
|
||||||
"lib/dotnet5.4/MimeKit.dll",
|
"lib/dotnet5.4/MimeKit.dll",
|
||||||
"lib/dotnet5.4/MimeKit.xml",
|
"lib/dotnet5.4/MimeKit.xml",
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
|
||||||
|
|
||||||
namespace Yavsc
|
namespace Yavsc
|
||||||
{
|
{
|
||||||
|
@ -111,6 +111,10 @@ namespace Yavsc
|
|||||||
services.Configure<GoogleAuthSettings>(googleSettings);
|
services.Configure<GoogleAuthSettings>(googleSettings);
|
||||||
var cinfoSettings = Configuration.GetSection("Authentication").GetSection("Societeinfo");
|
var cinfoSettings = Configuration.GetSection("Authentication").GetSection("Societeinfo");
|
||||||
services.Configure<CompanyInfoSettings>(cinfoSettings);
|
services.Configure<CompanyInfoSettings>(cinfoSettings);
|
||||||
|
var oauthLocalAppSettings = Configuration.GetSection("Authentication").GetSection("OAuth2LocalApp");
|
||||||
|
services.Configure<OAuth2AppSettings>(oauthLocalAppSettings);
|
||||||
|
var oauthFacebookSettings = Configuration.GetSection("Authentication").GetSection("Facebook");
|
||||||
|
services.Configure<FacebookOAuth2AppSettings>(oauthFacebookSettings);
|
||||||
|
|
||||||
services.Configure<MvcOptions>(options =>
|
services.Configure<MvcOptions>(options =>
|
||||||
{
|
{
|
||||||
@ -171,6 +175,7 @@ namespace Yavsc
|
|||||||
services.Add(ServiceDescriptor.Singleton(typeof(IOptions<SmtpSettings>), typeof(OptionsManager<SmtpSettings>)));
|
services.Add(ServiceDescriptor.Singleton(typeof(IOptions<SmtpSettings>), typeof(OptionsManager<SmtpSettings>)));
|
||||||
services.Add(ServiceDescriptor.Singleton(typeof(IOptions<GoogleAuthSettings>), typeof(OptionsManager<GoogleAuthSettings>)));
|
services.Add(ServiceDescriptor.Singleton(typeof(IOptions<GoogleAuthSettings>), typeof(OptionsManager<GoogleAuthSettings>)));
|
||||||
services.Add(ServiceDescriptor.Singleton(typeof(IOptions<CompanyInfoSettings>), typeof(OptionsManager<CompanyInfoSettings>)));
|
services.Add(ServiceDescriptor.Singleton(typeof(IOptions<CompanyInfoSettings>), typeof(OptionsManager<CompanyInfoSettings>)));
|
||||||
|
services.Add(ServiceDescriptor.Singleton(typeof(IOptions<OAuth2AppSettings>), typeof(OptionsManager<OAuth2AppSettings>)));
|
||||||
|
|
||||||
services.AddTransient<Microsoft.Extensions.WebEncoders.UrlEncoder, UrlEncoder>();
|
services.AddTransient<Microsoft.Extensions.WebEncoders.UrlEncoder, UrlEncoder>();
|
||||||
services.AddDataProtection();
|
services.AddDataProtection();
|
||||||
@ -229,6 +234,10 @@ namespace Yavsc
|
|||||||
{
|
{
|
||||||
options.AddPolicy("AdministratorOnly", policy => policy.RequireRole(Constants.AdminGroupName));
|
options.AddPolicy("AdministratorOnly", policy => policy.RequireRole(Constants.AdminGroupName));
|
||||||
options.AddPolicy("FrontOffice", policy => policy.RequireRole(Constants.FrontOfficeGroupName));
|
options.AddPolicy("FrontOffice", policy => policy.RequireRole(Constants.FrontOfficeGroupName));
|
||||||
|
options.AddPolicy("API", policy => {
|
||||||
|
policy.AddAuthenticationSchemes(JwtBearerDefaults.AuthenticationScheme);
|
||||||
|
policy.RequireClaim(OpenIdConnectConstants.Claims.Scope, "api-resource-controller");
|
||||||
|
});
|
||||||
// options.AddPolicy("EmployeeId", policy => policy.RequireClaim("EmployeeId", "123", "456"));
|
// options.AddPolicy("EmployeeId", policy => policy.RequireClaim("EmployeeId", "123", "456"));
|
||||||
// options.AddPolicy("BuildingEntry", policy => policy.Requirements.Add(new OfficeEntryRequirement()));
|
// options.AddPolicy("BuildingEntry", policy => policy.Requirements.Add(new OfficeEntryRequirement()));
|
||||||
});
|
});
|
||||||
@ -259,7 +268,7 @@ namespace Yavsc
|
|||||||
{
|
{
|
||||||
options.ResourcesPath = "Resources";
|
options.ResourcesPath = "Resources";
|
||||||
})
|
})
|
||||||
.AddDataAnnotationsLocalization();
|
.AddDataAnnotationsLocalization( opt => opt.ResourcesPath = "Resources");
|
||||||
|
|
||||||
services.AddScoped<LanguageActionFilter>();
|
services.AddScoped<LanguageActionFilter>();
|
||||||
// Inject ticket formatting
|
// Inject ticket formatting
|
||||||
@ -284,6 +293,7 @@ namespace Yavsc
|
|||||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||||
public void Configure(IApplicationBuilder app, IHostingEnvironment env,
|
public void Configure(IApplicationBuilder app, IHostingEnvironment env,
|
||||||
IOptions<SiteSettings> siteSettings, IOptions<RequestLocalizationOptions> localizationOptions,
|
IOptions<SiteSettings> siteSettings, IOptions<RequestLocalizationOptions> localizationOptions,
|
||||||
|
IOptions<OAuth2AppSettings> oauth2SettingsContainer,
|
||||||
ILoggerFactory loggerFactory)
|
ILoggerFactory loggerFactory)
|
||||||
{
|
{
|
||||||
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
|
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
|
||||||
@ -326,7 +336,9 @@ namespace Yavsc
|
|||||||
{
|
{
|
||||||
if (ex.InnerException is InvalidOperationException)
|
if (ex.InnerException is InvalidOperationException)
|
||||||
// nothing to do ?
|
// nothing to do ?
|
||||||
{ }
|
{
|
||||||
|
// TODO Send an email to the Admin
|
||||||
|
}
|
||||||
else throw ex;
|
else throw ex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user