Skip to content

Commit bb8ef2c

Browse files
authored
Merge branch 'v15/dev' into v15/bugfix/save-image-when-changing-focal-point
2 parents 3f57a50 + 3b6cdbe commit bb8ef2c

File tree

1,027 files changed

+10574
-14012
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,027 files changed

+10574
-14012
lines changed

.github/BUILD.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ In order to build the Umbraco source code locally with Visual Studio Code, first
3636

3737
Open the root folder of the repository in Visual Studio Code.
3838

39-
To build the front end you'll need to open the command pallet (<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd>) and run `>Tasks: Run Task` followed by `Client Build`.
39+
To build the front-end you'll need to open the command pallet (<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd>) and run `>Tasks: Run Task` followed by `Client Build`.
4040

4141
You can also run the tasks manually on the command line:
4242

@@ -46,9 +46,7 @@ npm i
4646
npm run build:for:cms
4747
```
4848

49-
If you just want to watch the UI Client to `Umbraco.Web.UI` then instead of running `build:for:cms`, you can do: `npm run dev:mock`. This will launch the Vite dev server on http://localhost:5173 and watch for changes with mocked API responses.
50-
51-
You can also run `npm run dev:server` to run the Vite server against a local Umbraco instance. In this case, you need to have the .NET project running and accept connections from the Vite server. Please see the Umbraco.Web.UI.Client README.md [Run against a local Umbraco instance](../src/Umbraco.Web.UI.Client/.github/README.md#run-against-a-local-umbraco-instance) for more information.
49+
If you want to make changes to the UI, you can choose to run a front-end development server. To learn more please read the Umbraco.Web.UI.Client README.md [Run against a local Umbraco instance](../src/Umbraco.Web.UI.Client/.github/README.md#run-against-a-local-umbraco-instance) for more information.
5250

5351
The login screen is a different frontend build, for that one you can run it as follows:
5452

.github/workflows/test-backoffice.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ jobs:
4040
cache: npm
4141
cache-dependency-path: ./src/Umbraco.Web.UI.Client/package-lock.json
4242
- run: npm ci --no-audit --no-fund --prefer-offline
43+
- name: Check for circular dependencies
44+
run: node devops/circular/index.js src
4345
- run: npm run lint:errors
4446
- run: npm run build:for:cms
4547
- run: npm run check:paths

build/azure-pipelines.yml

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -492,22 +492,22 @@ stages:
492492
matrix:
493493
LinuxPart1Of3:
494494
vmImage: "ubuntu-latest"
495-
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --shard=1/3'
495+
testCommand: "npm run smokeTest -- --shard=1/3"
496496
LinuxPart2Of3:
497497
vmImage: "ubuntu-latest"
498-
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --shard=2/3'
498+
testCommand: "npm run smokeTest -- --shard=2/3"
499499
LinuxPart3Of3:
500500
vmImage: "ubuntu-latest"
501-
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --shard=3/3'
501+
testCommand: "npm run smokeTest -- --shard=3/3"
502502
WindowsPart1Of3:
503503
vmImage: "windows-latest"
504-
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --shard=1/3'
504+
testCommand: "npm run smokeTest -- --shard=1/3"
505505
WindowsPart2Of3:
506506
vmImage: "windows-latest"
507-
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --shard=2/3'
507+
testCommand: "npm run smokeTest -- --shard=2/3"
508508
WindowsPart3Of3:
509509
vmImage: "windows-latest"
510-
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --shard=3/3'
510+
testCommand: "npm run smokeTest -- --shard=3/3"
511511
pool:
512512
vmImage: $(vmImage)
513513
steps:
@@ -612,7 +612,7 @@ stages:
612612
# Copy artifacts
613613
- pwsh: |
614614
if (Test-Path tests/Umbraco.Tests.AcceptanceTest/results/*) {
615-
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results $(Build.ArtifactStagingDirectory) -Recurse
615+
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results/* $(Build.ArtifactStagingDirectory) -Recurse
616616
}
617617
displayName: Copy Playwright results
618618
condition: succeededOrFailed()
@@ -623,8 +623,7 @@ stages:
623623
condition: succeededOrFailed()
624624
inputs:
625625
targetPath: $(Build.ArtifactStagingDirectory)
626-
artifact: "Acceptance Tests - $(Agent.JobName) - Attempt #$(System.JobAttempt)"
627-
626+
artifact: "Acceptance Test Results - $(Agent.JobName) - Attempt #$(System.JobAttempt)"
628627
- job:
629628
displayName: E2E Tests (SQL Server)
630629
variables:
@@ -635,29 +634,29 @@ stages:
635634
matrix:
636635
${{ if eq(parameters.sqlServerLinuxAcceptanceTests, True) }}:
637636
LinuxPart1Of3:
638-
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --grep-invert "Users" --shard=1/3'
637+
testCommand: "npm run smokeTestSqlite -- --shard=1/3"
639638
vmImage: "ubuntu-latest"
640639
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
641640
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
642641
LinuxPart2Of3:
643-
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --grep-invert "Users" --shard=2/3'
642+
testCommand: "npm run smokeTestSqlite -- --shard=2/3"
644643
vmImage: "ubuntu-latest"
645644
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
646645
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
647646
LinuxPart3Of3:
648-
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --grep-invert "Users" --shard=3/3'
647+
testCommand: "npm run smokeTestSqlite -- --shard=3/3"
649648
vmImage: "ubuntu-latest"
650649
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
651650
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
652651
WindowsPart1Of3:
653652
vmImage: "windows-latest"
654-
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --grep-invert "Users" --shard=1/3'
653+
testCommand: "npm run smokeTestSqlite -- --shard=1/3"
655654
WindowsPart2Of3:
656655
vmImage: "windows-latest"
657-
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --grep-invert "Users" --shard=2/3'
656+
testCommand: "npm run smokeTestSqlite -- --shard=2/3"
658657
WindowsPart3Of3:
659658
vmImage: "windows-latest"
660-
testCommand: 'npx playwright test DefaultConfig --grep "@smoke" --grep-invert "Users" --shard=3/3'
659+
testCommand: "npm run smokeTestSqlite -- --shard=3/3"
661660
pool:
662661
vmImage: $(vmImage)
663662
steps:
@@ -779,7 +778,7 @@ stages:
779778
# Copy artifacts
780779
- pwsh: |
781780
if (Test-Path tests/Umbraco.Tests.AcceptanceTest/results/*) {
782-
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results $(Build.ArtifactStagingDirectory) -Recurse
781+
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results/* $(Build.ArtifactStagingDirectory) -Recurse
783782
}
784783
displayName: Copy Playwright results
785784
condition: succeededOrFailed()
@@ -790,8 +789,7 @@ stages:
790789
condition: succeededOrFailed()
791790
inputs:
792791
targetPath: $(Build.ArtifactStagingDirectory)
793-
artifact: "Acceptance Tests - $(Agent.JobName) - Attempt #$(System.JobAttempt)"
794-
792+
artifact: "Acceptance Test Results - $(Agent.JobName) - Attempt #$(System.JobAttempt)"
795793
###############################################
796794
## Release
797795
###############################################

build/nightly-E2E-test-pipelines.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -111,22 +111,22 @@ stages:
111111
matrix:
112112
LinuxPart1Of3:
113113
vmImage: "ubuntu-latest"
114-
testCommand: "npx playwright test DefaultConfig --shard=1/3"
114+
testCommand: "npm run test -- --shard=1/3"
115115
LinuxPart2Of3:
116116
vmImage: "ubuntu-latest"
117-
testCommand: "npx playwright test DefaultConfig --shard=2/3"
117+
testCommand: "npm run test -- --shard=2/3"
118118
LinuxPart3Of3:
119119
vmImage: "ubuntu-latest"
120-
testCommand: "npx playwright test DefaultConfig --shard=3/3"
120+
testCommand: "npm run test -- --shard=3/3"
121121
WindowsPart1Of3:
122122
vmImage: "windows-latest"
123-
testCommand: "npx playwright test DefaultConfig --shard=1/3"
123+
testCommand: "npm run test -- --shard=1/3"
124124
WindowsPart2Of3:
125125
vmImage: "windows-latest"
126-
testCommand: "npx playwright test DefaultConfig --shard=2/3"
126+
testCommand: "npm run test -- --shard=2/3"
127127
WindowsPart3Of3:
128128
vmImage: "windows-latest"
129-
testCommand: "npx playwright test DefaultConfig --shard=3/3"
129+
testCommand: "npm run test -- --shard=3/3"
130130
pool:
131131
vmImage: $(vmImage)
132132
steps:
@@ -235,7 +235,7 @@ stages:
235235
# Copy artifacts
236236
- pwsh: |
237237
if (Test-Path tests/Umbraco.Tests.AcceptanceTest/results/*) {
238-
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results $(Build.ArtifactStagingDirectory) -Recurse
238+
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results/* $(Build.ArtifactStagingDirectory) -Recurse
239239
}
240240
displayName: Copy Playwright results
241241
condition: succeededOrFailed()
@@ -246,7 +246,7 @@ stages:
246246
condition: succeededOrFailed()
247247
inputs:
248248
targetPath: $(Build.ArtifactStagingDirectory)
249-
artifact: 'Acceptance Tests - $(Agent.JobName) - Attempt #$(System.JobAttempt)'
249+
artifact: "Acceptance Test Results - $(Agent.JobName) - Attempt #$(System.JobAttempt)"
250250

251251
- job:
252252
displayName: E2E Tests (SQL Server)
@@ -258,29 +258,29 @@ stages:
258258
strategy:
259259
matrix:
260260
LinuxPart1Of3:
261-
testCommand: "npx playwright test DefaultConfig --grep-invert \"Users\" --shard=1/3"
261+
testCommand: "npm run testSqlite -- --shard=1/3"
262262
vmImage: "ubuntu-latest"
263263
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
264264
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
265265
LinuxPart2Of3:
266-
testCommand: "npx playwright test DefaultConfig --grep-invert \"Users\" --shard=2/3"
266+
testCommand: "npm run testSqlite -- --shard=2/3"
267267
vmImage: "ubuntu-latest"
268268
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
269269
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
270270
LinuxPart3Of3:
271-
testCommand: "npx playwright test DefaultConfig --grep-invert \"Users\" --shard=3/3"
271+
testCommand: "npm run testSqlite -- --shard=3/3"
272272
vmImage: "ubuntu-latest"
273273
SA_PASSWORD: $(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD)
274274
CONNECTIONSTRINGS__UMBRACODBDSN: "Server=(local);Database=Umbraco;User Id=sa;Password=$(SA_PASSWORD);TrustServerCertificate=True"
275275
WindowsPart1Of3:
276276
vmImage: "windows-latest"
277-
testCommand: "npx playwright test DefaultConfig --grep-invert \"Users\" --shard=1/3"
277+
testCommand: "npm run testSqlite -- --shard=1/3"
278278
WindowsPart2Of3:
279279
vmImage: "windows-latest"
280-
testCommand: "npx playwright test DefaultConfig --grep-invert \"Users\" --shard=2/3"
280+
testCommand: "npm run testSqlite -- --shard=2/3"
281281
WindowsPart3Of3:
282282
vmImage: "windows-latest"
283-
testCommand: "npx playwright test DefaultConfig --grep-invert \"Users\" --shard=3/3"
283+
testCommand: "npm run testSqlite -- --shard=3/3"
284284
pool:
285285
vmImage: $(vmImage)
286286
steps:
@@ -406,7 +406,7 @@ stages:
406406
# Copy artifacts
407407
- pwsh: |
408408
if (Test-Path tests/Umbraco.Tests.AcceptanceTest/results/*) {
409-
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results $(Build.ArtifactStagingDirectory) -Recurse
409+
Copy-Item tests/Umbraco.Tests.AcceptanceTest/results/* $(Build.ArtifactStagingDirectory) -Recurse
410410
}
411411
displayName: Copy Playwright results
412412
condition: succeededOrFailed()
@@ -417,4 +417,4 @@ stages:
417417
condition: succeededOrFailed()
418418
inputs:
419419
targetPath: $(Build.ArtifactStagingDirectory)
420-
artifact: 'Acceptance Tests - $(Agent.JobName) - Attempt #$(System.JobAttempt)'
420+
artifact: "Acceptance Test Results - $(Agent.JobName) - Attempt #$(System.JobAttempt)"

src/Umbraco.Cms.Api.Delivery/Querying/Selectors/AncestorsSelector.cs

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,28 @@ public sealed class AncestorsSelector : QueryOptionBase, ISelectorHandler
1313
{
1414
private readonly IPublishedContentCache _publishedContentCache;
1515
private readonly IDocumentNavigationQueryService _navigationQueryService;
16+
private readonly IRequestPreviewService _requestPreviewService;
1617
private const string AncestorsSpecifier = "ancestors:";
1718

1819
public AncestorsSelector(
1920
IPublishedContentCache publishedContentCache,
2021
IRequestRoutingService requestRoutingService,
21-
IDocumentNavigationQueryService navigationQueryService)
22+
IDocumentNavigationQueryService navigationQueryService,
23+
IRequestPreviewService requestPreviewService)
2224
: base(publishedContentCache, requestRoutingService)
2325
{
2426
_publishedContentCache = publishedContentCache;
2527
_navigationQueryService = navigationQueryService;
28+
_requestPreviewService = requestPreviewService;
29+
}
30+
31+
[Obsolete("Use the constructor that takes all parameters. Scheduled for removal in V17.")]
32+
public AncestorsSelector(
33+
IPublishedContentCache publishedContentCache,
34+
IRequestRoutingService requestRoutingService,
35+
IDocumentNavigationQueryService navigationQueryService)
36+
: this(publishedContentCache, requestRoutingService, navigationQueryService, StaticServiceProvider.Instance.GetRequiredService<IRequestPreviewService>())
37+
{
2638
}
2739

2840
[Obsolete("Use the constructor that takes all parameters. Scheduled for removal in V17.")]
@@ -53,8 +65,17 @@ public SelectorOption BuildSelectorOption(string selector)
5365
};
5466
}
5567

56-
IPublishedContent contentItem = _publishedContentCache.GetById((Guid)id)
57-
?? throw new InvalidOperationException("Could not obtain the content cache");
68+
IPublishedContent? contentItem = _publishedContentCache.GetById(_requestPreviewService.IsPreview(), id.Value);
69+
70+
if (contentItem is null)
71+
{
72+
// no such content item, make sure the selector does not yield any results
73+
return new SelectorOption
74+
{
75+
FieldName = AncestorsSelectorIndexer.FieldName,
76+
Values = Array.Empty<string>()
77+
};
78+
}
5879

5980
var ancestorKeys = contentItem.Ancestors(_publishedContentCache, _navigationQueryService).Select(a => a.Key.ToString("D")).ToArray();
6081

src/Umbraco.Cms.Api.Management/Factories/UserPresentationFactory.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,8 @@ public async Task<CurrentUserResponseModel> CreateCurrentUserResponseModelAsync(
216216
HasAccessToAllLanguages = hasAccessToAllLanguages,
217217
HasAccessToSensitiveData = user.HasAccessToSensitiveData(),
218218
AllowedSections = allowedSections,
219-
IsAdmin = user.IsAdmin()
219+
IsAdmin = user.IsAdmin(),
220+
UserGroupIds = presentationUser.UserGroupIds,
220221
});
221222
}
222223

src/Umbraco.Cms.Api.Management/ViewModels/User/Current/CurrentUserResponseModel.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,10 @@
22

33
namespace Umbraco.Cms.Api.Management.ViewModels.User.Current;
44

5-
public class CurrentUserResponseModel
5+
public class CurrentUserResponseModel : UserPresentationBase
66
{
77
public required Guid Id { get; init; }
88

9-
public required string Email { get; init; } = string.Empty;
10-
11-
public required string UserName { get; init; } = string.Empty;
12-
13-
public required string Name { get; init; } = string.Empty;
14-
159
public required string? LanguageIsoCode { get; init; }
1610

1711
public required ISet<ReferenceByIdModel> DocumentStartNodeIds { get; init; } = new HashSet<ReferenceByIdModel>();
@@ -35,5 +29,6 @@ public class CurrentUserResponseModel
3529
public required ISet<IPermissionPresentationModel> Permissions { get; init; }
3630

3731
public required ISet<string> AllowedSections { get; init; }
32+
3833
public bool IsAdmin { get; set; }
3934
}

src/Umbraco.Cms.StaticAssets/umbraco/UmbracoBackOffice/Index.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<base href="@backOfficePath.EnsureEndsWith('/')" />
2929
<link rel="icon" type="image/svg+xml" href="@backOfficeAssetsPath/assets/favicon.svg" />
3030
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
31-
<meta name="apple-mobile-web-app-capable" content="yes"/>
31+
<meta name="mobile-web-app-capable" content="yes"/>
3232
<meta name="robots" content="noindex, nofollow"/>
3333
<meta name="pinterest" content="nopin"/>
3434
<title>Umbraco</title>

src/Umbraco.Cms.StaticAssets/umbraco/UmbracoLogin/Index.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<base href="@backOfficePath.EnsureEndsWith('/')"/>
4141
<link rel="icon" type="image/svg+xml" href="~/umbraco/login/favicon.svg"/>
4242
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
43-
<meta name="apple-mobile-web-app-capable" content="yes"/>
43+
<meta name="mobile-web-app-capable" content="yes"/>
4444
<meta name="robots" content="noindex, nofollow"/>
4545
<meta name="pinterest" content="nopin"/>
4646
<title>Umbraco</title>

src/Umbraco.Core/Services/DocumentUrlService.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -736,8 +736,6 @@ private IEnumerable<Guid> GetKeysInRoot(bool considerFirstLevelAsRoot, bool isDr
736736

737737
if (considerFirstLevelAsRoot)
738738
{
739-
yield return rootKeys.First();
740-
741739
foreach (Guid rootKey in rootKeys)
742740
{
743741
if (isDraft is false && IsContentPublished(rootKey, culture) is false)

0 commit comments

Comments
 (0)