[Mono-dev] SiteMapProvider patch
Dumitru Ban
dban at dako.ro
Tue May 29 04:45:29 EDT 2007
Hi,
I'm trying to create a patch for SiteMapProvider->IsAccessibleToUser method.
Let's say a web.sitemap file is present, having the following content:
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="home.aspx" title="Home">
<siteMapNode title="Test_no_url_no_roles"/>
<siteMapNode title="Test_no_url_roles" roles="Administrator"/>
</siteMapNode>
</siteMap>
With Microsoft .NET, the "Test_no_url_no_roles" node is not accessible to any user and the "Test_no_url_roles" is accessible only to an Administrator.
In mono, both nodes are accessible to anyone. And this is because if the url of the node is null or is the empty string, the method returns true.
On the method there is a [MonoTODO ("need to implement cases 2 and 3")]. But number 2 is already started and the code
String url = node.Url;
if (String.IsNullOrEmpty(url))
return true;
is already there.
Shouldn't we have the same behaviour as Microsoft .NET?
Thanks & best regards,
Dumi.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070529/0ccd4447/attachment.html
More information about the Mono-devel-list
mailing list