Fix userid zero in integration tests (#14639)
* test: Fix invalid user ids * feat: Update parameter defaults with constants
This commit is contained in:
committed by
GitHub
parent
3a7e388547
commit
d33c44c0a3
@@ -66,7 +66,7 @@ internal class ContentVersionService : IContentVersionService
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void SetPreventCleanup(int versionId, bool preventCleanup, int userId = -1)
|
||||
public void SetPreventCleanup(int versionId, bool preventCleanup, int userId = Constants.Security.SuperUserId)
|
||||
{
|
||||
using (ICoreScope scope = _scopeProvider.CreateCoreScope(autoComplete: true))
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) Umbraco.
|
||||
// Copyright (c) Umbraco.
|
||||
// See LICENSE for more details.
|
||||
|
||||
using Umbraco.Cms.Core;
|
||||
@@ -34,7 +34,7 @@ public static class MediaServiceExtensions
|
||||
return mediaService.GetByIds(guids.Select(x => x.Guid));
|
||||
}
|
||||
|
||||
public static IMedia CreateMedia(this IMediaService mediaService, string name, Udi parentId, string mediaTypeAlias, int userId = 0)
|
||||
public static IMedia CreateMedia(this IMediaService mediaService, string name, Udi parentId, string mediaTypeAlias, int userId = Constants.Security.SuperUserId)
|
||||
{
|
||||
if (parentId is not GuidUdi guidUdi)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user