diff --git a/Dapplo.CaliburnMicro/CaliburnMicroBootstrapper.cs b/Dapplo.CaliburnMicro/CaliburnMicroBootstrapper.cs index d706d83c..11671e5f 100644 --- a/Dapplo.CaliburnMicro/CaliburnMicroBootstrapper.cs +++ b/Dapplo.CaliburnMicro/CaliburnMicroBootstrapper.cs @@ -35,6 +35,7 @@ using System.Windows; using Caliburn.Micro; using Dapplo.Addons; +using Dapplo.CaliburnMicro.Security; using Dapplo.Log; using Dapplo.Utils.Resolving; @@ -184,7 +185,7 @@ protected override void OnStartup(object sender, StartupEventArgs e) // Call the base, this actually currently does nothing but who knows what is added later. base.OnStartup(sender, e); - // Warn when no IShell export is found + // Inform when no IShell export is found var shells = ServiceLocator.GetExports(); if (shells.Any()) { @@ -195,6 +196,15 @@ protected override void OnStartup(object sender, StartupEventArgs e) { Log.Info().WriteLine("No IShell export found, if you want to have an initial window make sure you exported your ViewModel with [Export(typeof(IShell))]"); } + + // Warn when no IAuthenticationProvider export is found + var authenticationProvider = ServiceLocator.GetExports().FirstOrDefault(); + if (authenticationProvider != null) + { + Log.Info().WriteLine("IAuthenticationProvider to provide UI permissions: {0}", authenticationProvider.Value.GetType()); + } else { + Log.Warn().WriteLine("No IAuthenticationProvider export found, UI permissions will not work."); + } } /// diff --git a/Dapplo.CaliburnMicro/Security/IAuthenticationProvider.cs b/Dapplo.CaliburnMicro/Security/IAuthenticationProvider.cs index f15d3566..12425284 100644 --- a/Dapplo.CaliburnMicro/Security/IAuthenticationProvider.cs +++ b/Dapplo.CaliburnMicro/Security/IAuthenticationProvider.cs @@ -23,8 +23,6 @@ #endregion -using System.ComponentModel; - namespace Dapplo.CaliburnMicro.Security { ///