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

Align Azure Communication Implementations #16747

Merged
merged 10 commits into from
Sep 18, 2024
2 changes: 1 addition & 1 deletion src/OrchardCore.Cms.Web/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@
// "Username": "",
// "Password": ""
//},
//"OrchardCore_Email_Azure": {
//"OrchardCore_Email_AzureCommunicationServices": {
// "DefaultSender": "",
// "ConnectionString": ""
//}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public override async Task<IDisplayResult> EditAsync(ISite site, AzureEmailSetti
model.IsEnabled = settings.IsEnabled;
model.DefaultSender = settings.DefaultSender;
model.HasConnectionString = !string.IsNullOrWhiteSpace(settings.ConnectionString);
}).Location("Content:5#Azure")
}).Location("Content:5#Azure Communication Services")
.OnGroup(SettingsGroupId);
}

Expand Down
6 changes: 3 additions & 3 deletions src/OrchardCore.Modules/OrchardCore.Email.Azure/Manifest.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
using OrchardCore.Modules.Manifest;

[assembly: Module(
Name = "Azure Email Provider",
Name = "Azure Communication Services Email",
Author = ManifestConstants.OrchardCoreTeam,
Website = ManifestConstants.OrchardCoreWebsite,
Version = ManifestConstants.OrchardCoreVersion,
Description = "Provides an email service provider leveraging Azure Communication Services (ACS).",
Description = "Provides email service providers leveraging Azure Communication Services (ACS).",
Piedone marked this conversation as resolved.
Show resolved Hide resolved
Dependencies =
[
"OrchardCore.Email"
"OrchardCore.Email",
MikeAlhayek marked this conversation as resolved.
Show resolved Hide resolved
],
Category = "Messaging"
)]
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ public AzureEmailProvider(
{
}

public override LocalizedString DisplayName => S["Azure Communication Service"];
public override LocalizedString DisplayName
=> S["Azure Communication Services"];
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ public DefaultAzureEmailProvider(
{
}

public override LocalizedString DisplayName => S["Default Azure Communication Service"];
public override LocalizedString DisplayName
=> S["Default Azure Communication Services"];
}
3 changes: 3 additions & 0 deletions src/OrchardCore.Modules/OrchardCore.Email.Azure/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ public void ConfigureServices(IServiceCollection services)

services.Configure<DefaultAzureEmailOptions>(options =>
{
_shellConfiguration.GetSection("OrchardCore_Email_AzureCommunicationServices").Bind(options);

// The 'OrchardCore_Email_Azure' key can be removed in version 3.
_shellConfiguration.GetSection("OrchardCore_Email_Azure").Bind(options);

options.IsEnabled = options.ConfigurationExists();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public override IDisplayResult Edit(ISite site, AzureSmsSettings settings, Build
model.IsEnabled = settings.IsEnabled;
model.PhoneNumber = settings.PhoneNumber;
model.HasConnectionString = !string.IsNullOrEmpty(settings.ConnectionString);
}).Location("Content:5#Azure Communication")
}).Location("Content:5#Azure Communication Services")
.RenderWhen(() => _authorizationService.AuthorizeAsync(_httpContextAccessor.HttpContext?.User, SmsPermissions.ManageSmsSettings))
.OnGroup(SettingsGroupId);
}
Expand Down
2 changes: 1 addition & 1 deletion src/OrchardCore.Modules/OrchardCore.Sms.Azure/Manifest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
)]

[assembly: Feature(
Name = "Azure Communication SMS",
Name = "Azure Communication Services SMS",
Id = "OrchardCore.Sms.Azure",
Description = "Enables the ability to send SMS messages through Azure Communication Services (ACS).",
Dependencies =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ public AzureSmsProvider(
}

public override LocalizedString Name
=> S["Azure Communication"];
=> S["Azure Communication Services"];
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ public DefaultAzureSmsProvider(
}

public override LocalizedString Name
=> S["Default Azure Communication"];
=> S["Default Azure Communication Services"];
}
16 changes: 8 additions & 8 deletions src/docs/reference/modules/Email.Azure/README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# Azure Email (`OrchardCore.Email.Azure`)
# Azure Communication Services Email (`OrchardCore.Email.Azure`)

This module provides an Email provider for sending emails through [Azure Communication Services Email](https://learn.microsoft.com/en-us/azure/communication-services/concepts/email/email-overview).
This module adds Email providers for sending emails through [Azure Communication Services](https://learn.microsoft.com/en-us/azure/communication-services/concepts/email/email-overview).

## Azure Communication Service Settings
## **Azure Communication Services** Provider Configuration

Enabling this module will introduce a new tab labeled 'Azure' within the email settings, allowing you to configure the service. To access these settings, navigate to `Configuration` → `Settings` → `Email` and click on the 'Azure' tab. The following are the available settings
Enabling this module will introduce a new tab labeled **Azure Communication Services** within the email settings, allowing you to configure the service. To access these settings, navigate to `Configuration` → `Settings` → `Email` and click on the **Azure Communication Services** tab. The following are the available settings

| Setting | Description |
| --- | --- |
| `ConnectionString` | The ACS connection string that will be used to deliver the email.
| `DefaultSender` | The email of the sender. This will override the `DefaultSender` setting in [`OrchardCore.Email`](../Email/README.md). |
| `ConnectionString` | The ACS connection string that will be used to deliver the email.

## Default Azure Communication Service Configuration
## **Default Azure Communication Services** Provider Configuration

You may configure the Default Azure Email Service provider by the configuration provider using the following settings:

```json
"OrchardCore_Email_Azure": {
"OrchardCore_Email_AzureCommunicationServices": {
"DefaultSender": "",
"ConnectionString": ""
}
Expand All @@ -25,4 +25,4 @@ You may configure the Default Azure Email Service provider by the configuration
For more information about configurations, please refer to [Configuration](../../core/Configuration/README.md).

!!! note
Configuration of the Default Azure Email provider is not possible through Admin Settings. Utilize the configuration provider for the necessary setup. The provider will appear only if the configuration exists.
Configuration of the **Default Azure Communication Services** provider is not possible through Admin Settings. Utilize the configuration provider for the necessary setup. The provider will appear only if the configuration exists.
12 changes: 6 additions & 6 deletions src/docs/reference/modules/Sms.Azure/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Azure SMS (`OrchardCore.Sms.Azure`)
# Azure Communication Services SMS (`OrchardCore.Sms.Azure`)

This feature provides SMS providers for sending SMS through [Azure Communication Services SMS](https://learn.microsoft.com/en-us/azure/communication-services/concepts/sms/concepts).

## **Azure Communication** Provider Configuration
## **Azure Communication Services** Provider Configuration

Enabling this feature will introduce a new tab labeled **Azure** within the SMS settings, allowing you to configure the service. To access these settings from the admin dashboard, navigate to `Configuration` → `Settings` → `Sms` and click on the 'Azure Communication' tab. The following are the available settings.
Enabling this feature will introduce a new tab labeled **Azure Communication Services** within the SMS settings, allowing you to configure the service. To access these settings from the admin dashboard, navigate to `Configuration` → `Settings` → `Sms` and click on the **Azure Communication Services** tab. The following are the available settings.

| Provider | Description |
| --- | --- |
| `Azure` | This provider enables tenant-specific Azure Communication Services for sending SMS. Configure the SMS settings to activate this provider. |
| `DefaultAzure` | This provider sets default Azure Communication Service configurations for all tenants.|


## **Default Azure Communication** Provider Configuration
## **Default Azure Communication Services** Provider Configuration

You may configure the **Default Azure Communication** using any configuration provider via the following settings:
You may configure the **Default Azure Communication Services** using any configuration provider via the following settings:

```json
"OrchardCore_Sms_AzureCommunicationServices": {
Expand All @@ -26,4 +26,4 @@ You may configure the **Default Azure Communication** using any configuration pr
For more information about configurations, please refer to [Configuration](../../core/Configuration/README.md).

!!! note
Configuration of the **Default Azure Communication** provider cannot be performed through Admin Settings. Instead, use the configuration provider for setup. Note that the provider will only appear if the configuration is present.
Configuration of the **Default Azure Communication Services** provider cannot be performed through Admin Settings. Instead, use the configuration provider for setup. Note that the provider will only appear if the configuration is present.
8 changes: 7 additions & 1 deletion src/docs/releases/2.1.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ The following properties of `RegistrationSettings` are now deprecated and will b

Previously, the `UsersCanRegister` property controlled which types of registration were allowed. With this update, this property is obsolete and will be removed in a future release. To enable site registration now, simply activate the **User Registration** feature.

### New 'Azure Communication SMS' feature
### New **Azure Communication Services SMS** Feature

A new feature was added to allow you to send SMS messages using Azure Communication Services (ACS). Simply enable it then navigate to the admin dashboard > `Configurations` >> `Settings` >> `SMS` to configure the provider. For more information you can refer to the [docs](../reference/modules/Sms.Azure/README.md).

### **Azure Communication Services Email** Feature Update

The feature formerly known as **Azure Email Provider** has been renamed to **Azure Communication Services Email** to clarify that it uses ACS, and to use the same naming pattern as the ACS SMS feature (see above).

Additionally, the configuration provider key for the default provider has changed from `OrchardCore_Email_Azure` to `OrchardCore_Email_AzureCommunicationServices`. While the old key (`OrchardCore_Email_Azure`) will continue to bind for backward compatibility, it is scheduled for removal in the next major release. To ensure future compatibility, it is highly recommended to update your configuration to use the new key.
Piedone marked this conversation as resolved.
Show resolved Hide resolved