Skip to content

Commit 56d5704

Browse files
committed
bool.Try
1 parent 91ce071 commit 56d5704

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/Umbraco.Core/Configuration/GlobalSettings.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -406,14 +406,8 @@ public bool AllowContentDashboardAccessToAllUsers
406406
{
407407
get
408408
{
409-
try
410-
{
411-
return bool.Parse(ConfigurationManager.AppSettings[Constants.AppSettings.AllowContentDashboardAccessToAllUsers]);
412-
}
413-
catch
414-
{
415-
return false;
416-
}
409+
bool.TryParse(ConfigurationManager.AppSettings[Constants.AppSettings.AllowContentDashboardAccessToAllUsers], out var value);
410+
return value;
417411
}
418412
}
419413

0 commit comments

Comments
 (0)