[bistro-framework] r463 committed - updated security check for better compatibility with f#

0 views
Skip to first unread message

codesite...@google.com

unread,
Jun 16, 2010, 6:35:31 PM6/16/10
to bistro-d...@googlegroups.com
Revision: 463
Author: kolosy
Date: Wed Jun 16 15:34:54 2010
Log: updated security check for better compatibility with f#
http://code.google.com/p/bistro-framework/source/detail?r=463

Modified:

/Bistro/branches/0.9.2.0/Bistro.Core/Controllers/Dispatch/ControllerDispatcher.cs

=======================================
---
/Bistro/branches/0.9.2.0/Bistro.Core/Controllers/Dispatch/ControllerDispatcher.cs
Thu Jan 21 07:07:31 2010
+++
/Bistro/branches/0.9.2.0/Bistro.Core/Controllers/Dispatch/ControllerDispatcher.cs
Wed Jun 16 15:34:54 2010
@@ -31,6 +31,7 @@
using System.Reflection;
using Bistro.Configuration.Logging;
using System.Text.RegularExpressions;
+using System.Linq;

namespace Bistro.Controllers.Dispatch
{
@@ -152,7 +153,8 @@

int i = 0;
while (i < controllers.Count)
- if
(typeof(ISecurityController).IsAssignableFrom(controllers[i].BindPoint.Controller.ControllerType
as Type))
+ if
(typeof(ISecurityController).IsAssignableFrom(controllers[i].BindPoint.Controller.ControllerType
as Type) ||
+
controllers[i].BindPoint.Controller.ControllerType.GetCustomAttributes(typeof(SecurityAttribute),
false).FirstOrDefault() != null)
{
securityControllers.Add(controllers[i]);
controllers.RemoveAt(i);

Reply all
Reply to author
Forward
0 new messages