Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V10: Fix build warnings in core #12438

Merged
merged 119 commits into from
Jun 7, 2022
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
2056e5d
Run code cleanup
May 6, 2022
869c48b
Start manual cleanup after dotnet format
May 17, 2022
ffa487e
Finish up manual pass
May 19, 2022
bb8763e
Fix up missed warnings
May 20, 2022
d399210
Merge remote-tracking branch 'origin/v10/dev' into v10/bugfix/fix-bui…
May 20, 2022
a6cea61
Fix after merge
May 20, 2022
f86682c
Update src/Umbraco.Core/Cache/ContentTypeCacheRefresher.cs
Zeegaan Jun 7, 2022
fdb6ed5
Update src/Umbraco.Core/Cache/DataTypeCacheRefresher.cs
Zeegaan Jun 7, 2022
8ac48ed
Update src/Umbraco.Core/Cache/DeepCloneAppCache.cs
Zeegaan Jun 7, 2022
e1e7667
Update src/Umbraco.Core/Cache/DomainCacheRefresher.cs
Zeegaan Jun 7, 2022
441c471
Update src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs
Zeegaan Jun 7, 2022
bef747b
Update src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs
Zeegaan Jun 7, 2022
c059af6
Update src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs
Zeegaan Jun 7, 2022
1c93056
Update src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs
Zeegaan Jun 7, 2022
6834c02
Update src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs
Zeegaan Jun 7, 2022
dfc0bf8
Update src/Umbraco.Core/Cache/MacroCacheRefresher.cs
Zeegaan Jun 7, 2022
6e80faa
Update src/Umbraco.Core/Cache/MediaCacheRefresher.cs
Zeegaan Jun 7, 2022
f10dd03
Update src/Umbraco.Core/Cache/MemberCacheRefresher.cs
Zeegaan Jun 7, 2022
1a4921c
Update src/Umbraco.Core/Cache/MemberGroupCacheRefresher.cs
Zeegaan Jun 7, 2022
13f05bb
Update src/Umbraco.Core/Composing/OrderedCollectionBuilderBase.cs
Zeegaan Jun 7, 2022
e42fa7a
Update src/Umbraco.Core/Configuration/Models/RequestHandlerSettings.cs
Zeegaan Jun 7, 2022
36db366
Update src/Umbraco.Core/Composing/SetCollectionBuilderBase.cs
Zeegaan Jun 7, 2022
003d0c2
Update src/Umbraco.Core/Composing/WeightedCollectionBuilderBase.cs
Zeegaan Jun 7, 2022
6c5da5a
Update src/Umbraco.Core/ContentApps/ContentAppFactoryCollectionBuilde…
Zeegaan Jun 7, 2022
9239fc3
Update src/Umbraco.Core/Dashboards/DashboardCollectionBuilder.cs
Zeegaan Jun 7, 2022
649431f
Update src/Umbraco.Core/Extensions/StringExtensions.cs
Zeegaan Jun 7, 2022
cddaa5c
Update src/Umbraco.Core/Extensions/StringExtensions.cs
Zeegaan Jun 7, 2022
cf4e8a7
Update src/Umbraco.Core/Extensions/StringExtensions.cs
Zeegaan Jun 7, 2022
0f39bd3
Update src/Umbraco.Core/Extensions/StringExtensions.cs
Zeegaan Jun 7, 2022
5f1b3e6
Update src/Umbraco.Core/Extensions/StringExtensions.cs
Zeegaan Jun 7, 2022
acb21aa
Update src/Umbraco.Core/Extensions/StringExtensions.cs
Zeegaan Jun 7, 2022
600b07d
Update src/Umbraco.Core/Extensions/StringExtensions.cs
Zeegaan Jun 7, 2022
720d746
Update src/Umbraco.Core/Notifications/ContentTypeRefreshedNotificatio…
Zeegaan Jun 7, 2022
13c5236
Update src/Umbraco.Core/Notifications/ContentTypeSavedNotification.cs
Zeegaan Jun 7, 2022
e0b16b4
Update src/Umbraco.Core/Notifications/ContentTypeSavingNotification.cs
Zeegaan Jun 7, 2022
883cb0d
Update src/Umbraco.Core/Notifications/DictionaryCacheRefresherNotific…
Zeegaan Jun 7, 2022
d780e7a
Update src/Umbraco.Core/Notifications/DataTypeCacheRefresherNotificat…
Zeegaan Jun 7, 2022
8e4e9d0
Update src/Umbraco.Core/Notifications/ContentUnpublishingNotification.cs
Zeegaan Jun 7, 2022
cbfdc91
Update src/Umbraco.Core/Notifications/DictionaryItemDeletingNotificat…
Zeegaan Jun 7, 2022
2258beb
Update src/Umbraco.Core/Notifications/DictionaryItemSavedNotification.cs
Zeegaan Jun 7, 2022
cf9b7a6
Update src/Umbraco.Core/Notifications/DictionaryItemSavingNotificatio…
Zeegaan Jun 7, 2022
4236d1b
Update src/Umbraco.Core/Notifications/DomainCacheRefresherNotificatio…
Zeegaan Jun 7, 2022
10dadb8
Update src/Umbraco.Core/Notifications/LanguageCacheRefresherNotificat…
Zeegaan Jun 7, 2022
02727d6
Update src/Umbraco.Core/Notifications/MacroCacheRefresherNotification.cs
Zeegaan Jun 7, 2022
c012522
Update src/Umbraco.Core/Notifications/MediaCacheRefresherNotification.cs
Zeegaan Jun 7, 2022
9bd4d8a
Update src/Umbraco.Core/Notifications/MediaEmptiedRecycleBinNotificat…
Zeegaan Jun 7, 2022
0bd3f02
Update src/Umbraco.Core/Notifications/MediaEmptyingRecycleBinNotifica…
Zeegaan Jun 7, 2022
2d72eff
Update src/Umbraco.Core/Notifications/MediaMovedNotification.cs
Zeegaan Jun 7, 2022
2af8898
Update src/Umbraco.Core/Notifications/MediaMovedToRecycleBinNotificat…
Zeegaan Jun 7, 2022
ce850c0
Update src/Umbraco.Core/Extensions/StringExtensions.cs
Zeegaan Jun 7, 2022
7bb7299
Update src/Umbraco.Core/Extensions/StringExtensions.cs
Zeegaan Jun 7, 2022
26b88e9
Update src/Umbraco.Core/Extensions/StringExtensions.cs
Zeegaan Jun 7, 2022
21b5bb1
Update src/Umbraco.Core/Extensions/StringExtensions.cs
Zeegaan Jun 7, 2022
67f6885
Update src/Umbraco.Core/Extensions/StringExtensions.cs
Zeegaan Jun 7, 2022
7a08b72
Update src/Umbraco.Core/Extensions/StringExtensions.cs
Zeegaan Jun 7, 2022
af2f9f7
Update src/Umbraco.Core/Notifications/MediaMovedToRecycleBinNotificat…
Zeegaan Jun 7, 2022
61c9bed
Update src/Umbraco.Core/Notifications/MediaMovingNotification.cs
Zeegaan Jun 7, 2022
47eb1c4
Update src/Umbraco.Core/Notifications/MediaMovingToRecycleBinNotifica…
Zeegaan Jun 7, 2022
f547324
Update src/Umbraco.Core/Notifications/MediaTreeChangeNotification.cs
Zeegaan Jun 7, 2022
5d6c842
Update src/Umbraco.Core/Notifications/MediaTreeChangeNotification.cs
Zeegaan Jun 7, 2022
a9f17b1
Update src/Umbraco.Core/Notifications/MediaTypeChangedNotification.cs
Zeegaan Jun 7, 2022
7fd4e26
Update src/Umbraco.Core/Notifications/MediaTypeDeletingNotification.cs
Zeegaan Jun 7, 2022
61396d3
Update src/Umbraco.Core/Notifications/MediaTypeMovedNotification.cs
Zeegaan Jun 7, 2022
c3eb485
Update src/Umbraco.Core/Notifications/MediaTypeMovingNotification.cs
Zeegaan Jun 7, 2022
9812bb3
Update src/Umbraco.Core/Notifications/MediaTypeMovingNotification.cs
Zeegaan Jun 7, 2022
6729dcc
Update src/Umbraco.Core/Notifications/MediaTypeRefreshedNotification.cs
Zeegaan Jun 7, 2022
b40ba1c
Update src/Umbraco.Core/Notifications/MemberCacheRefresherNotificatio…
Zeegaan Jun 7, 2022
cef658a
Update src/Umbraco.Core/Notifications/MemberGroupCacheRefresherNotifi…
Zeegaan Jun 7, 2022
ff2b8e9
Update src/Umbraco.Core/Notifications/MemberGroupDeletingNotification.cs
Zeegaan Jun 7, 2022
159a3a7
Update src/Umbraco.Core/Notifications/MemberGroupSavedNotification.cs
Zeegaan Jun 7, 2022
0817fd7
Update src/Umbraco.Core/Notifications/MemberGroupSavingNotification.cs
Zeegaan Jun 7, 2022
990cb3d
Update src/Umbraco.Core/Notifications/MemberTypeChangedNotification.cs
Zeegaan Jun 7, 2022
330390a
Update src/Umbraco.Core/Notifications/MemberTypeDeletedNotification.cs
Zeegaan Jun 7, 2022
78c5fd0
Update src/Umbraco.Core/Notifications/MemberTypeDeletingNotification.cs
Zeegaan Jun 7, 2022
c8ce324
Update src/Umbraco.Core/Notifications/MemberTypeMovedNotification.cs
Zeegaan Jun 7, 2022
db1e3b9
Update src/Umbraco.Core/Notifications/MemberTypeMovedNotification.cs
Zeegaan Jun 7, 2022
3a22e8f
Update src/Umbraco.Core/Notifications/MemberTypeMovingNotification.cs
Zeegaan Jun 7, 2022
4905375
Update src/Umbraco.Core/Notifications/MemberTypeMovingNotification.cs
Zeegaan Jun 7, 2022
2c090a0
Update src/Umbraco.Core/Notifications/MemberTypeRefreshedNotification.cs
Zeegaan Jun 7, 2022
ff4aca8
Update src/Umbraco.Core/Notifications/MemberTypeSavingNotification.cs
Zeegaan Jun 7, 2022
2683672
Update src/Umbraco.Core/Extensions/StringExtensions.cs
Zeegaan Jun 7, 2022
b2dea4c
Update src/Umbraco.Core/Extensions/UriExtensions.cs
Zeegaan Jun 7, 2022
1ce4aef
Update src/Umbraco.Core/Notifications/MovedToRecycleBinNotification.cs
Zeegaan Jun 7, 2022
f72a01d
Update src/Umbraco.Core/Notifications/MovedToRecycleBinNotification.cs
Zeegaan Jun 7, 2022
acdabe2
Update src/Umbraco.Core/Notifications/MovingToRecycleBinNotification.cs
Zeegaan Jun 7, 2022
c0694f6
Update src/Umbraco.Core/Notifications/MovingToRecycleBinNotification.cs
Zeegaan Jun 7, 2022
2514d7a
Update src/Umbraco.Core/Notifications/PartialViewDeletingNotification.cs
Zeegaan Jun 7, 2022
b56e493
Update src/Umbraco.Core/Extensions/UriExtensions.cs
Zeegaan Jun 7, 2022
4dd4a58
Update src/Umbraco.Core/IO/PhysicalFileSystem.cs
Zeegaan Jun 7, 2022
38ec95d
Update src/Umbraco.Core/IO/PhysicalFileSystem.cs
Zeegaan Jun 7, 2022
b463e47
Update src/Umbraco.Core/IO/ShadowWrapper.cs
Zeegaan Jun 7, 2022
159272d
Update src/Umbraco.Core/Logging/DisposableTimer.cs
Zeegaan Jun 7, 2022
78886ba
Update src/Umbraco.Core/Install/InstallSteps/UpgradeStep.cs
Zeegaan Jun 7, 2022
b4c6cf5
Update src/Umbraco.Core/Mapping/MapDefinitionCollectionBuilder.cs
Zeegaan Jun 7, 2022
e540c44
Update src/Umbraco.Core/Media/EmbedProviders/EmbedProvidersCollection…
Zeegaan Jun 7, 2022
cc3506a
Update src/Umbraco.Core/Notifications/PartialViewSavedNotification.cs
Zeegaan Jun 7, 2022
7480738
Update src/Umbraco.Core/Models/ContentEditing/ContentVariationDisplay.cs
Zeegaan Jun 7, 2022
d860a68
Update src/Umbraco.Core/Notifications/PartialViewSavingNotification.cs
Zeegaan Jun 7, 2022
8a02257
Update src/Umbraco.Core/Notifications/PublicAccessCacheRefresherNotif…
Zeegaan Jun 7, 2022
8d23456
Update src/Umbraco.Core/Notifications/PublicAccessEntryDeletedNotific…
Zeegaan Jun 7, 2022
8dbc4a3
Update src/Umbraco.Core/Notifications/PublicAccessEntryDeletingNotifi…
Zeegaan Jun 7, 2022
d4f26df
Update src/Umbraco.Core/Notifications/PublicAccessEntryDeletingNotifi…
Zeegaan Jun 7, 2022
a594b64
Update src/Umbraco.Core/Notifications/PublicAccessEntrySavedNotificat…
Zeegaan Jun 7, 2022
9587d81
Update src/Umbraco.Core/Notifications/PublicAccessEntrySavingNotifica…
Zeegaan Jun 7, 2022
0173eab
Update src/Umbraco.Core/Notifications/PublicAccessEntrySavingNotifica…
Zeegaan Jun 7, 2022
8ed9460
Update src/Umbraco.Core/Notifications/RelationTypeCacheRefresherNotif…
Zeegaan Jun 7, 2022
1414932
Update src/Umbraco.Core/Notifications/RelationTypeDeletingNotificatio…
Zeegaan Jun 7, 2022
cbe4c45
Update src/Umbraco.Core/Notifications/RelationTypeSavedNotification.cs
Zeegaan Jun 7, 2022
3c02be5
Update src/Umbraco.Core/Notifications/RelationTypeSavingNotification.cs
Zeegaan Jun 7, 2022
650aeb0
Update src/Umbraco.Core/Notifications/StatefulNotification.cs
Zeegaan Jun 7, 2022
92e196c
Update src/Umbraco.Core/Notifications/StylesheetDeletingNotification.cs
Zeegaan Jun 7, 2022
78f831b
Update src/Umbraco.Core/Notifications/StylesheetSavingNotification.cs
Zeegaan Jun 7, 2022
c64688a
Update src/Umbraco.Core/Models/DeepCloneHelper.cs
Zeegaan Jun 7, 2022
85da9b9
Update src/Umbraco.Core/Models/File.cs
Zeegaan Jun 7, 2022
dfc23be
Update src/Umbraco.Core/Models/PropertyGroupExtensions.cs
Zeegaan Jun 7, 2022
7531c3c
Update src/Umbraco.Core/Models/PropertyGroupExtensions.cs
Zeegaan Jun 7, 2022
c4214ac
Fix based on review
Zeegaan Jun 7, 2022
9687dfd
Merge remote-tracking branch 'origin/v10/dev' into v10/bugfix/fix-bui…
Zeegaan Jun 7, 2022
f0e7547
Fix after merge
Zeegaan Jun 7, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 7 additions & 7 deletions src/Umbraco.Core/Actions/ActionAssignDomain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@ namespace Umbraco.Cms.Core.Actions;
public class ActionAssignDomain : IAction
{
/// <summary>
/// The unique action letter
/// The unique action letter
/// </summary>
public const char ActionLetter = 'I';

/// <inheritdoc/>
/// <inheritdoc />
public char Letter => ActionLetter;

/// <inheritdoc/>
/// <inheritdoc />
public string Alias => "assignDomain";

/// <inheritdoc/>
/// <inheritdoc />
public string Category => Constants.Conventions.PermissionCategories.AdministrationCategory;

/// <inheritdoc/>
/// <inheritdoc />
public string Icon => "home";

/// <inheritdoc/>
/// <inheritdoc />
public bool ShowInNotifier => false;

/// <inheritdoc/>
/// <inheritdoc />
public bool CanBePermissionAssigned => true;
}
69 changes: 35 additions & 34 deletions src/Umbraco.Core/Actions/ActionBrowse.cs
Original file line number Diff line number Diff line change
@@ -1,40 +1,41 @@
// Copyright (c) Umbraco.
// Copyright (c) Umbraco.
// See LICENSE for more details.

namespace Umbraco.Cms.Core.Actions
namespace Umbraco.Cms.Core.Actions;

/// <summary>
/// This action is used as a security constraint that grants a user the ability to view nodes in a tree
/// that has permissions applied to it.
/// </summary>
/// <remarks>
/// This action should not be invoked. It is used as the minimum required permission to view nodes in the content tree.
/// By
/// granting a user this permission, the user is able to see the node in the tree but not edit the document. This may
/// be used by other trees
/// that support permissions in the future.
/// </remarks>
public class ActionBrowse : IAction
{
/// <summary>
/// This action is used as a security constraint that grants a user the ability to view nodes in a tree
/// that has permissions applied to it.
/// The unique action letter
/// </summary>
/// <remarks>
/// This action should not be invoked. It is used as the minimum required permission to view nodes in the content tree. By
/// granting a user this permission, the user is able to see the node in the tree but not edit the document. This may be used by other trees
/// that support permissions in the future.
/// </remarks>
public class ActionBrowse : IAction
{
/// <summary>
/// The unique action letter
/// </summary>
public const char ActionLetter = 'F';

/// <inheritdoc/>
public char Letter => ActionLetter;

/// <inheritdoc/>
public bool ShowInNotifier => false;

/// <inheritdoc/>
public bool CanBePermissionAssigned => true;

/// <inheritdoc/>
public string Icon => string.Empty;

/// <inheritdoc/>
public string Alias => "browse";

/// <inheritdoc/>
public string Category => Constants.Conventions.PermissionCategories.ContentCategory;
}
public const char ActionLetter = 'F';

/// <inheritdoc />
public char Letter => ActionLetter;

/// <inheritdoc />
public bool ShowInNotifier => false;

/// <inheritdoc />
public bool CanBePermissionAssigned => true;

/// <inheritdoc />
public string Icon => string.Empty;

/// <inheritdoc />
public string Alias => "browse";

/// <inheritdoc />
public string Category => Constants.Conventions.PermissionCategories.ContentCategory;
}
84 changes: 40 additions & 44 deletions src/Umbraco.Core/Actions/ActionCollection.cs
Original file line number Diff line number Diff line change
@@ -1,60 +1,56 @@
// Copyright (c) Umbraco.
// See LICENSE for more details.

using System;
using System.Collections.Generic;
using System.Linq;
using Umbraco.Cms.Core.Composing;
using Umbraco.Cms.Core.Models.Membership;
using Umbraco.Extensions;

namespace Umbraco.Cms.Core.Actions
namespace Umbraco.Cms.Core.Actions;

/// <summary>
/// The collection of actions
/// </summary>
public class ActionCollection : BuilderCollectionBase<IAction>
{
/// <summary>
/// The collection of actions
/// Initializes a new instance of the <see cref="ActionCollection" /> class.
/// </summary>
public class ActionCollection : BuilderCollectionBase<IAction>
public ActionCollection(Func<IEnumerable<IAction>> items)
: base(items)
{
/// <summary>
/// Initializes a new instance of the <see cref="ActionCollection"/> class.
/// </summary>
public ActionCollection(Func<IEnumerable<IAction>> items)
: base(items)
{
}
}

/// <summary>
/// Gets the action of the specified type.
/// </summary>
/// <typeparam name="T">The specified type to get</typeparam>
/// <returns>The action</returns>
public T? GetAction<T>()
where T : IAction => this.OfType<T>().FirstOrDefault();
/// <summary>
/// Gets the action of the specified type.
/// </summary>
/// <typeparam name="T">The specified type to get</typeparam>
/// <returns>The action</returns>
public T? GetAction<T>()
where T : IAction => this.OfType<T>().FirstOrDefault();

/// <summary>
/// Gets the actions by the specified letters
/// </summary>
public IEnumerable<IAction> GetByLetters(IEnumerable<string> letters)
{
IAction[] actions = this.ToArray(); // no worry: internally, it's already an array
return letters
.Where(x => x.Length == 1)
.Select(x => actions.FirstOrDefault(y => y.Letter == x[0]))
.WhereNotNull()
.ToList();
}
/// <summary>
/// Gets the actions by the specified letters
/// </summary>
public IEnumerable<IAction> GetByLetters(IEnumerable<string> letters)
{
IAction[] actions = this.ToArray(); // no worry: internally, it's already an array
return letters
.Where(x => x.Length == 1)
.Select(x => actions.FirstOrDefault(y => y.Letter == x[0]))
.WhereNotNull()
.ToList();
}

/// <summary>
/// Gets the actions from an EntityPermission
/// </summary>
public IReadOnlyList<IAction> FromEntityPermission(EntityPermission entityPermission)
{
IAction[] actions = this.ToArray(); // no worry: internally, it's already an array
return entityPermission.AssignedPermissions
.Where(x => x.Length == 1)
.SelectMany(x => actions.Where(y => y.Letter == x[0]))
.WhereNotNull()
.ToList();
}
/// <summary>
/// Gets the actions from an EntityPermission
/// </summary>
public IReadOnlyList<IAction> FromEntityPermission(EntityPermission entityPermission)
{
IAction[] actions = this.ToArray(); // no worry: internally, it's already an array
return entityPermission.AssignedPermissions
.Where(x => x.Length == 1)
.SelectMany(x => actions.Where(y => y.Letter == x[0]))
.WhereNotNull()
.ToList();
}
}
45 changes: 21 additions & 24 deletions src/Umbraco.Core/Actions/ActionCollectionBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,35 +1,32 @@
// Copyright (c) Umbraco.
// Copyright (c) Umbraco.
// See LICENSE for more details.

using System;
using System.Collections.Generic;
using System.Linq;
using Umbraco.Cms.Core.Composing;

namespace Umbraco.Cms.Core.Actions
namespace Umbraco.Cms.Core.Actions;

/// <summary>
/// The action collection builder
/// </summary>
public class ActionCollectionBuilder : LazyCollectionBuilderBase<ActionCollectionBuilder, ActionCollection, IAction>
{
/// <summary>
/// The action collection builder
/// </summary>
public class ActionCollectionBuilder : LazyCollectionBuilderBase<ActionCollectionBuilder, ActionCollection, IAction>
/// <inheritdoc />
protected override ActionCollectionBuilder This => this;

/// <inheritdoc />
protected override IEnumerable<IAction> CreateItems(IServiceProvider factory)
{
/// <inheritdoc/>
protected override ActionCollectionBuilder This => this;
var items = base.CreateItems(factory).ToList();

/// <inheritdoc/>
protected override IEnumerable<IAction> CreateItems(IServiceProvider factory)
// Validate the items, no actions should exist that do not either expose notifications or permissions
var invalidItems = items.Where(x => !x.CanBePermissionAssigned && !x.ShowInNotifier).ToList();
if (invalidItems.Count == 0)
{
var items = base.CreateItems(factory).ToList();

// Validate the items, no actions should exist that do not either expose notifications or permissions
var invalidItems = items.Where(x => !x.CanBePermissionAssigned && !x.ShowInNotifier).ToList();
if (invalidItems.Count == 0)
{
return items;
}

var invalidActions = string.Join(", ", invalidItems.Select(x => "'" + x.Alias + "'"));
throw new InvalidOperationException($"Invalid actions {invalidActions}'. All {typeof(IAction)} implementations must be true for either {nameof(IAction.CanBePermissionAssigned)} or {nameof(IAction.ShowInNotifier)}.");
return items;
}

var invalidActions = string.Join(", ", invalidItems.Select(x => "'" + x.Alias + "'"));
throw new InvalidOperationException(
$"Invalid actions {invalidActions}'. All {typeof(IAction)} implementations must be true for either {nameof(IAction.CanBePermissionAssigned)} or {nameof(IAction.ShowInNotifier)}.");
}
}
43 changes: 21 additions & 22 deletions src/Umbraco.Core/Actions/ActionCopy.cs
Original file line number Diff line number Diff line change
@@ -1,34 +1,33 @@
// Copyright (c) Umbraco.
// Copyright (c) Umbraco.
// See LICENSE for more details.

namespace Umbraco.Cms.Core.Actions
namespace Umbraco.Cms.Core.Actions;

/// <summary>
/// This action is invoked when copying a document, media, member
/// </summary>
public class ActionCopy : IAction
{
/// <summary>
/// This action is invoked when copying a document, media, member
/// The unique action letter
/// </summary>
public class ActionCopy : IAction
{
/// <summary>
/// The unique action letter
/// </summary>
public const char ActionLetter = 'O';
public const char ActionLetter = 'O';

/// <inheritdoc/>
public char Letter => ActionLetter;
/// <inheritdoc />
public char Letter => ActionLetter;

/// <inheritdoc/>
public string Alias => "copy";
/// <inheritdoc />
public string Alias => "copy";

/// <inheritdoc/>
public string Category => Constants.Conventions.PermissionCategories.StructureCategory;
/// <inheritdoc />
public string Category => Constants.Conventions.PermissionCategories.StructureCategory;

/// <inheritdoc/>
public string Icon => "documents";
/// <inheritdoc />
public string Icon => "documents";

/// <inheritdoc/>
public bool ShowInNotifier => true;
/// <inheritdoc />
public bool ShowInNotifier => true;

/// <inheritdoc/>
public bool CanBePermissionAssigned => true;
}
/// <inheritdoc />
public bool CanBePermissionAssigned => true;
}
39 changes: 19 additions & 20 deletions src/Umbraco.Core/Actions/ActionCreateBlueprintFromContent.cs
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
// Copyright (c) Umbraco.
// Copyright (c) Umbraco.
// See LICENSE for more details.

namespace Umbraco.Cms.Core.Actions
namespace Umbraco.Cms.Core.Actions;

/// <summary>
/// This action is invoked when creating a blueprint from a content
/// </summary>
public class ActionCreateBlueprintFromContent : IAction
{
/// <summary>
/// This action is invoked when creating a blueprint from a content
/// </summary>
public class ActionCreateBlueprintFromContent : IAction
{
/// <inheritdoc/>
public char Letter => 'ï';
/// <inheritdoc />
public char Letter => 'ï';

/// <inheritdoc/>
public bool ShowInNotifier => false;
/// <inheritdoc />
public bool ShowInNotifier => false;

/// <inheritdoc/>
public bool CanBePermissionAssigned => true;
/// <inheritdoc />
public bool CanBePermissionAssigned => true;

/// <inheritdoc/>
public string Icon => "blueprint";
/// <inheritdoc />
public string Icon => "blueprint";

/// <inheritdoc/>
public string Alias => "createblueprint";
/// <inheritdoc />
public string Alias => "createblueprint";

/// <inheritdoc/>
public string Category => Constants.Conventions.PermissionCategories.ContentCategory;
}
/// <inheritdoc />
public string Category => Constants.Conventions.PermissionCategories.ContentCategory;
}
Loading