Merge remote-tracking branch 'origin/v13/dev' into v14/dev
# Conflicts: # build/azure-pipelines.yml # src/Umbraco.Core/Constants-Configuration.cs # src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Configuration.cs # src/Umbraco.Core/Factories/IDatabaseSettingsFactory.cs # src/Umbraco.Core/Factories/IInstallSettingsFactory.cs # src/Umbraco.Core/Factories/IUpgradeSettingsFactory.cs # src/Umbraco.Core/Factories/InstallSettingsFactory.cs # src/Umbraco.Core/Factories/UpgradeSettingsFactory.cs # src/Umbraco.Core/Factories/UserSettingsFactory.cs # src/Umbraco.Core/Installer/IInstallStep.cs # src/Umbraco.Core/Installer/IUpgradeStep.cs # src/Umbraco.Core/Installer/NewInstallStepCollection.cs # src/Umbraco.Core/Installer/NewInstallStepCollectionBuilder.cs # src/Umbraco.Core/Installer/Steps/FilePermissionsStep.cs # src/Umbraco.Core/Installer/Steps/RestartRuntimeStep.cs # src/Umbraco.Core/Installer/Steps/TelemetryIdentifierStep.cs # src/Umbraco.Core/Installer/UpgradeStepCollection.cs # src/Umbraco.Core/Installer/UpgradeStepCollectionBuilder.cs # src/Umbraco.Core/Models/Blocks/RichTextBlockLayoutItem.cs # src/Umbraco.Core/Models/Blocks/RichTextEditorBlockDataConverter.cs # src/Umbraco.Core/Models/Configuration/NewBackOfficeSettings.cs # src/Umbraco.Core/Models/Configuration/NewBackOfficeSettingsValidator.cs # src/Umbraco.Core/Models/Installer/ConsentLevelModel.cs # src/Umbraco.Core/Models/Installer/DatabaseInstallData.cs # src/Umbraco.Core/Models/Installer/DatabaseSettingsModel.cs # src/Umbraco.Core/Models/Installer/InstallData.cs # src/Umbraco.Core/Models/Installer/InstallSettingsModel.cs # src/Umbraco.Core/Models/Installer/PasswordSettingsModel.cs # src/Umbraco.Core/Models/Installer/UpgradeSettingsModel.cs # src/Umbraco.Core/Models/Installer/UserInstallData.cs # src/Umbraco.Core/Models/Installer/UserSettingsModel.cs # src/Umbraco.Core/Models/OutOfDateType.cs # src/Umbraco.Core/PaginationHelper.cs # src/Umbraco.Core/Services/Installer/IInstallService.cs # src/Umbraco.Core/Services/Installer/IUpgradeService.cs # src/Umbraco.Core/Services/Installer/InstallService.cs # src/Umbraco.Core/Services/Installer/UpgradeService.cs # src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Repositories.cs # src/Umbraco.Infrastructure/Factories/Installer/DatabaseSettingsFactory.cs # src/Umbraco.Infrastructure/Installer/Steps/CreateUserStep.cs # src/Umbraco.Infrastructure/Installer/Steps/DatabaseConfigureStep.cs # src/Umbraco.Infrastructure/Installer/Steps/DatabaseInstallStep.cs # src/Umbraco.Infrastructure/Installer/Steps/DatabaseUpgradeStep.cs # src/Umbraco.Infrastructure/Installer/Steps/RegisterInstallCompleteStep.cs # src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs # src/Umbraco.Infrastructure/Models/Blocks/BlockEditorDataConverter.cs # src/Umbraco.Infrastructure/PropertyEditors/BlockEditorPropertyValueEditor.cs # src/Umbraco.Infrastructure/PropertyEditors/BlockEditorValidator.cs # src/Umbraco.Infrastructure/PropertyEditors/BlockEditorValues.cs # src/Umbraco.Infrastructure/PropertyEditors/RichTextPropertyEditor.cs # src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockGridPropertyValueConverter.cs # src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockListPropertyValueConverter.cs # src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockPropertyValueConverterBase.cs # src/Umbraco.Infrastructure/Security/IBackOfficeApplicationManager.cs # src/Umbraco.Infrastructure/Services/IIndexingRebuilderService.cs # src/Umbraco.Infrastructure/Services/IndexingRebuilderService.cs # src/Umbraco.New.Cms.Core/Umbraco.New.Cms.Core.csproj # src/Umbraco.New.Cms.Infrastructure/Umbraco.New.Cms.Infrastructure.csproj # src/Umbraco.New.Cms.Web.Common/Umbraco.New.Cms.Web.Common.csproj # tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/content.spec.ts # tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Login/login.spec.ts # tests/Umbraco.Tests.UnitTests/Umbraco.Core/PropertyEditors/BlockListPropertyValueConverterTests.cs # version.json
This commit is contained in:
@@ -165,12 +165,7 @@ public class ContentPermissions
|
||||
throw new ArgumentNullException(nameof(user));
|
||||
}
|
||||
|
||||
if (permissionsToCheck == null)
|
||||
{
|
||||
permissionsToCheck = Array.Empty<char>();
|
||||
}
|
||||
|
||||
bool? hasPathAccess = null;
|
||||
bool hasPathAccess;
|
||||
entity = null;
|
||||
|
||||
if (nodeId == Constants.System.Root)
|
||||
@@ -181,19 +176,17 @@ public class ContentPermissions
|
||||
{
|
||||
hasPathAccess = user.HasContentBinAccess(_entityService, _appCaches);
|
||||
}
|
||||
|
||||
if (hasPathAccess.HasValue)
|
||||
else
|
||||
{
|
||||
return hasPathAccess.Value ? ContentAccess.Granted : ContentAccess.Denied;
|
||||
}
|
||||
entity = _entityService.Get(nodeId, UmbracoObjectTypes.Document);
|
||||
|
||||
entity = _entityService.Get(nodeId, UmbracoObjectTypes.Document);
|
||||
if (entity == null)
|
||||
{
|
||||
return ContentAccess.NotFound;
|
||||
}
|
||||
if (entity == null)
|
||||
{
|
||||
return ContentAccess.NotFound;
|
||||
}
|
||||
|
||||
hasPathAccess = user.HasContentPathAccess(entity, _entityService, _appCaches);
|
||||
hasPathAccess = user.HasContentPathAccess(entity, _entityService, _appCaches);
|
||||
}
|
||||
|
||||
if (hasPathAccess == false)
|
||||
{
|
||||
@@ -206,7 +199,8 @@ public class ContentPermissions
|
||||
}
|
||||
|
||||
// get the implicit/inherited permissions for the user for this path
|
||||
return CheckPermissionsPath(entity.Path, user, permissionsToCheck)
|
||||
// if there is no entity for this id, than just use the id as the path (i.e. -1 or -20)
|
||||
return CheckPermissionsPath(entity?.Path ?? nodeId.ToString(), user, permissionsToCheck)
|
||||
? ContentAccess.Granted
|
||||
: ContentAccess.Denied;
|
||||
}
|
||||
@@ -230,12 +224,7 @@ public class ContentPermissions
|
||||
throw new ArgumentNullException(nameof(user));
|
||||
}
|
||||
|
||||
if (permissionsToCheck == null)
|
||||
{
|
||||
permissionsToCheck = Array.Empty<char>();
|
||||
}
|
||||
|
||||
bool? hasPathAccess = null;
|
||||
bool hasPathAccess;
|
||||
contentItem = null;
|
||||
|
||||
if (nodeId == Constants.System.Root)
|
||||
@@ -246,19 +235,17 @@ public class ContentPermissions
|
||||
{
|
||||
hasPathAccess = user.HasContentBinAccess(_entityService, _appCaches);
|
||||
}
|
||||
|
||||
if (hasPathAccess.HasValue)
|
||||
else
|
||||
{
|
||||
return hasPathAccess.Value ? ContentAccess.Granted : ContentAccess.Denied;
|
||||
}
|
||||
contentItem = _contentService.GetById(nodeId);
|
||||
|
||||
contentItem = _contentService.GetById(nodeId);
|
||||
if (contentItem == null)
|
||||
{
|
||||
return ContentAccess.NotFound;
|
||||
}
|
||||
if (contentItem == null)
|
||||
{
|
||||
return ContentAccess.NotFound;
|
||||
}
|
||||
|
||||
hasPathAccess = user.HasPathAccess(contentItem, _entityService, _appCaches);
|
||||
hasPathAccess = user.HasPathAccess(contentItem, _entityService, _appCaches);
|
||||
}
|
||||
|
||||
if (hasPathAccess == false)
|
||||
{
|
||||
@@ -271,7 +258,8 @@ public class ContentPermissions
|
||||
}
|
||||
|
||||
// get the implicit/inherited permissions for the user for this path
|
||||
return CheckPermissionsPath(contentItem.Path, user, permissionsToCheck)
|
||||
// if there is no content item for this id, than just use the id as the path (i.e. -1 or -20)
|
||||
return CheckPermissionsPath(contentItem?.Path ?? nodeId.ToString(), user, permissionsToCheck)
|
||||
? ContentAccess.Granted
|
||||
: ContentAccess.Denied;
|
||||
}
|
||||
@@ -283,8 +271,7 @@ public class ContentPermissions
|
||||
permissionsToCheck = Array.Empty<char>();
|
||||
}
|
||||
|
||||
// get the implicit/inherited permissions for the user for this path,
|
||||
// if there is no content item for this id, than just use the id as the path (i.e. -1 or -20)
|
||||
// get the implicit/inherited permissions for the user for this path
|
||||
EntityPermissionSet permission = _userService.GetPermissionsForPath(user, path);
|
||||
|
||||
var allowed = true;
|
||||
|
||||
Reference in New Issue
Block a user