Ignored login fault stemming from v4/v5 conflict

This commit is contained in:
Rick Falkvinge
2012-10-21 12:37:09 +00:00
parent a86f726b5c
commit 08abff9880
+13 -5
View File
@@ -25,11 +25,19 @@ namespace Activizr.Database
{
while (reader.Read())
{
result.Add(new BasicPermission(
(RoleType)(Enum.Parse(typeof(RoleType), reader.GetString(0), true)),
(Permission)(Enum.Parse(typeof(Permission), reader.GetString(1), true))
)
);
try
{
result.Add(new BasicPermission(
(RoleType)(Enum.Parse(typeof(RoleType), reader.GetString(0), true)),
(Permission)(Enum.Parse(typeof(Permission), reader.GetString(1), true))
)
);
}
catch (ArgumentException)
{
// Ignore if the enums are not found. v4/v5 conflict.
// TODO: alert about this.
}
}
}
}