Author: mhabersack
Date: 2007-05-29 09:03:45 -0400 (Tue, 29 May 2007)
New Revision: 78118
Modified:
trunk/mcs/class/System.Web/System.Web/ChangeLog
trunk/mcs/class/System.Web/System.Web/SiteMapProvider.cs
Log:
A correction to 78114
2007-05-29 Marek Habersack <[EMAIL PROTECTED]>
* SiteMapProvider.cs: updated the node accessibility comments.
If Roles not null and user is not in at least one of the
specified roles, return false.
If there Url is null or empty, return false.
Modified: trunk/mcs/class/System.Web/System.Web/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web/ChangeLog 2007-05-29 12:51:08 UTC
(rev 78117)
+++ trunk/mcs/class/System.Web/System.Web/ChangeLog 2007-05-29 13:03:45 UTC
(rev 78118)
@@ -2,7 +2,7 @@
* SiteMapProvider.cs: updated the node accessibility comments.
If Roles not null and user is not in at least one of the
- configured roles (or the collection is empty), return false.
+ specified roles, return false.
If there Url is null or empty, return false.
2007-05-28 Marek Habersack <[EMAIL PROTECTED]>
Modified: trunk/mcs/class/System.Web/System.Web/SiteMapProvider.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web/SiteMapProvider.cs 2007-05-29
12:51:08 UTC (rev 78117)
+++ trunk/mcs/class/System.Web/System.Web/SiteMapProvider.cs 2007-05-29
13:03:45 UTC (rev 78118)
@@ -183,8 +183,9 @@
*/
/* 1. */
- if (node.Roles != null) {
- foreach (string rolename in node.Roles)
+ IList roles = node.Roles;
+ if (roles != null && roles.Count > 0) {
+ foreach (string rolename in roles)
if (rolename == "*" ||
context.User.IsInRole (rolename))
return true;
return false;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches