You've already forked linux-packaging-mono
Imported Upstream version 4.0.0~alpha1
Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
This commit is contained in:
@ -60,13 +60,7 @@ namespace System.Web.Security
|
||||
return;
|
||||
|
||||
HttpRequest req = context.Request;
|
||||
#if NET_2_0
|
||||
AuthorizationSection config = (AuthorizationSection) WebConfigurationManager.GetSection ("system.web/authorization", req.Path, context);
|
||||
#else
|
||||
AuthorizationConfig config = (AuthorizationConfig) context.GetConfig ("system.web/authorization");
|
||||
if (config == null)
|
||||
return;
|
||||
#endif
|
||||
if (!config.IsValidUser (context.User, req.HttpMethod)) {
|
||||
HttpException e = new HttpException (401, "Unauthorized");
|
||||
HttpResponse response = context.Response;
|
||||
@ -77,14 +71,12 @@ namespace System.Web.Security
|
||||
}
|
||||
}
|
||||
|
||||
#if NET_2_0
|
||||
public static bool CheckUrlAccessForPrincipal (string virtualPath, IPrincipal user, string verb)
|
||||
{
|
||||
AuthorizationSection config = (AuthorizationSection) WebConfigurationManager.GetSection ("system.web/authorization", virtualPath);
|
||||
|
||||
return config == null ? true : config.IsValidUser (user, verb);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user