Skip to content

Commit

Permalink
Removing warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Psichorex committed Jun 8, 2024
1 parent 3802fac commit 1fcb866
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ public TenantLoginController(
[IgnoreAntiforgeryToken]
public async Task<IActionResult> Index(string password)
{
if (!ModelState.IsValid) return BadRequest(ModelState);

if (_shellSettings.Name.EqualsOrdinalIgnoreCase(ShellSettings.DefaultShellName))
{
return NotFound();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ public class TenantAdminPermissions : AdminPermissionBase
public static readonly Permission LoginAsAdmin =
new(nameof(LoginAsAdmin), "Able to login as an admin to any tenant from the Default tenant.");

protected override IEnumerable<Permission> AdminPermissions => new[] { LoginAsAdmin };
protected override IEnumerable<Permission> AdminPermissions => [LoginAsAdmin];
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static OrchardCoreBuilder ConfigureFeaturesGuardForAzureStorage(this Orch
builder.ConfigureFeaturesGuardWithoutOverriding(
new Dictionary<string, IEnumerable<string>>
{
["OrchardCore.Media.Azure.Storage"] = new List<string> { "OrchardCore.Media" },
["OrchardCore.Media.Azure.Storage"] = ["OrchardCore.Media"],
});

/// <summary>
Expand All @@ -26,7 +26,7 @@ public static OrchardCoreBuilder ConfigureFeaturesGuardForElasticsearch(this Orc
new Dictionary<string, IEnumerable<string>>
{
["OrchardCore.Search.Elasticsearch"] =
new List<string> { "OrchardCore.Search", "OrchardCore.Indexing" },
["OrchardCore.Search", "OrchardCore.Indexing"],
});

/// <summary>
Expand All @@ -37,7 +37,7 @@ public static OrchardCoreBuilder ConfigureFeaturesGuardForEmailQuota(this Orchar
builder.ConfigureFeaturesGuardWithoutOverriding(
new Dictionary<string, IEnumerable<string>>
{
["Lombiq.Hosting.Tenants.EmailQuotaManagement"] = new List<string> { "OrchardCore.Email" },
["Lombiq.Hosting.Tenants.EmailQuotaManagement"] = ["OrchardCore.Email"],
});

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ public ShellSettingsEditorController(
[ValidateAntiForgeryToken]
public async Task<IActionResult> Edit(ShellSettingsEditorViewModel model)
{
if (!ModelState.IsValid) return BadRequest(ModelState);

if (!await _authorizationService.AuthorizeAsync(User, ManageTenants) ||
!_shellHost.TryGetSettings(model.TenantId, out var shellSettings))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ namespace Lombiq.Hosting.Tenants.Management.Settings;

public class HideRecipesFromSetupOptions
{
public IEnumerable<string> HiddenTags { get; set; } = new[] { HideFromSetupScreen };
public IEnumerable<string> HiddenTags { get; set; } = [HideFromSetupScreen];
}

0 comments on commit 1fcb866

Please sign in to comment.