2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
authorSebastien Pouliot <sebastien@ximian.com>
Fri, 2 Sep 2005 13:29:54 +0000 (13:29 -0000)
committerSebastien Pouliot <sebastien@ximian.com>
Fri, 2 Sep 2005 13:29:54 +0000 (13:29 -0000)
* Cache.cs: Added security permissions with Minimal level for
AspNetHostingPermissionLevel (only LinkDemand as the class is sealed).
* CacheDependency.cs: : Added security permissions with Minimal level
for AspNetHostingPermissionLevel (note class is sealed only in 1.x).

svn path=/trunk/mcs/; revision=49342

mcs/class/System.Web/System.Web.Caching/Cache.cs
mcs/class/System.Web/System.Web.Caching/CacheDependency.cs
mcs/class/System.Web/System.Web.Caching/ChangeLog

index a42acd18ccca4f1c49ef00bd2dcd577f91dd0269..67f01144ad95ecb2c40c56ee36d49e3ac78fe155 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-using System;
 using System.Threading;
 using System.Collections;
+using System.Security.Permissions;
 
 namespace System.Web.Caching
 {
+       // CAS - no InheritanceDemand here as the class is sealed
+       [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
        public sealed class Cache: IEnumerable
        {
                Hashtable cache;
index 2cb3c5105abcdc89b042f5739e3b04b5354538fe..f887f5da77571ecc7bab7a91f4f7caf10a888cc6 100644 (file)
 
 using System.Collections;
 using System.IO;
+using System.Security.Permissions;
 
 namespace System.Web.Caching
 {
-       public sealed class CacheDependency: IDisposable
-       {
+#if NET_2_0
+       // CAS
+       [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       public class CacheDependency: IDisposable {
+#else
+       // CAS - no InheritanceDemand here as the class is sealed
+       [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       public sealed class CacheDependency: IDisposable {
+#endif
                string[] cachekeys;
                CacheDependency dependency;
                DateTime start;
index 592686c1db7ecb7443e7e46c83dc63ca71d2b641..65d66be87bd37d0328d5fbdf6fdb68fc8c56c748 100644 (file)
@@ -1,3 +1,10 @@
+2005-09-02  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * Cache.cs: Added security permissions with Minimal level for
+       AspNetHostingPermissionLevel (only LinkDemand as the class is sealed).
+       * CacheDependency.cs: : Added security permissions with Minimal level 
+       for AspNetHostingPermissionLevel (note class is sealed only in 1.x).
+
 2005-09-01 Eyal Alaluf <eyala@mainsoft.com>
        * CacheDependency.cs: TARGET_J2EE fixes.
 
@@ -34,7 +41,7 @@
        * CacheDependency.cs - added TARGET_JVM directives in places,
          where file watching is using (Mainsoft's implementation currently
          doesn't support the feature).
-         
+
 2005-05-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
        * CacheEntry.cs: credits for this patch should go to mcs. it catched