Skip to content

Commit 3f03209

Browse files
add option to skip non-core plugins
1 parent 64ccaa4 commit 3f03209

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

src/Certify.Core/Management/CertifyManager/CertifyManager.cs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ private void AddSystemStatusItem(string systemStatusCategory, string systemStatu
133133
_systemStatusItems.Add(new ActionStep(systemStatusKey, systemStatusCategory, title, description, hasError, hasWarning));
134134
}
135135

136-
public async Task Init()
136+
public async Task Init(bool enablePlugins = true)
137137
{
138138
_useWindowsNativeFeatures = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
139139

@@ -174,15 +174,26 @@ public async Task Init()
174174
EnableExternalPlugins = CoreAppSettings.Current.IncludeExternalPlugins
175175
};
176176

177-
_pluginManager.LoadPlugins(new List<string> {
177+
if (!enablePlugins)
178+
{
179+
// load plugins for core service functionality
180+
_pluginManager.LoadPlugins(new List<string> {
181+
PluginManager.PLUGINS_LICENSING,
182+
PluginManager.PLUGINS_DASHBOARD
183+
});
184+
}
185+
else
186+
{
187+
_pluginManager.LoadPlugins(new List<string> {
178188
PluginManager.PLUGINS_LICENSING,
179189
PluginManager.PLUGINS_DASHBOARD,
180190
PluginManager.PLUGINS_DEPLOYMENT_TASKS,
181191
PluginManager.PLUGINS_CERTIFICATE_MANAGERS,
182192
PluginManager.PLUGINS_DNS_PROVIDERS,
183193
PluginManager.PLUGINS_SERVER_PROVIDERS,
184194
PluginManager.PLUGINS_DATASTORE_PROVIDERS
185-
});
195+
});
196+
}
186197

187198
// setup supported target server types for default deployment
188199
if (_pluginManager.ServerProviders != null)

src/Certify.Models/Providers/ICertifyManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace Certify.Management
1717
{
1818
public interface ICertifyManager
1919
{
20-
Task Init();
20+
Task Init(bool enablePlugins = true);
2121
void SetStatusReporting(IStatusReporting statusReporting);
2222
Task<bool> IsServerTypeAvailable(StandardServerTypes serverType);
2323
Task<Version> GetServerTypeVersion(StandardServerTypes serverType);

0 commit comments

Comments
 (0)