Merge pull request #9965 from umbraco/netcore/bugfix/AB10799-fix-authorization-policies-bound-to-translation-section

NetCore: Fix authorization policies bound to Translation section
This commit is contained in:
Bjarke Berg
2021-03-10 15:32:32 +01:00
committed by GitHub
2 changed files with 4 additions and 11 deletions

View File

@@ -365,16 +365,10 @@ namespace Umbraco.Extensions
policy.Requirements.Add(new TreeRequirement(Constants.Trees.Languages));
});
options.AddPolicy(AuthorizationPolicies.TreeAccessDocumentTypes, policy =>
{
policy.AuthenticationSchemes.Add(backOfficeAuthenticationScheme);
policy.Requirements.Add(new TreeRequirement(Constants.Trees.Dictionary));
});
options.AddPolicy(AuthorizationPolicies.TreeAccessDictionary, policy =>
{
policy.AuthenticationSchemes.Add(backOfficeAuthenticationScheme);
policy.Requirements.Add(new TreeRequirement(Constants.Trees.Dictionary, Constants.Trees.Dictionary));
policy.Requirements.Add(new TreeRequirement(Constants.Trees.Dictionary));
});
options.AddPolicy(AuthorizationPolicies.TreeAccessDictionaryOrTemplates, policy =>

View File

@@ -1,6 +1,6 @@
{
"ConnectionStrings": {
"umbracoDbDSN": "Server=(LocalDB)\\Umbraco;Database=Netcore;Integrated Security=true"
"umbracoDbDSN": ""
},
"Serilog": {
"MinimumLevel": {
@@ -25,8 +25,7 @@
"HideTopLevelNodeFromPath": true,
"UmbracoPath": "~/umbraco",
"TimeOutInMinutes": 20,
"UseHttps": false,
"Id": "ddc95ed0-565b-4a63-bcdc-841f312f3e12"
"UseHttps": false
},
"Hosting": {
"Debug": false
@@ -43,7 +42,7 @@
"version": "637432008251409860"
},
"Security": {
"KeepUserLoggedIn": true,
"KeepUserLoggedIn": false,
"UsernameIsEmail": true,
"HideDisabledUsersInBackoffice": false,
"UserPassword": {