List:Commits« Previous MessageNext Message »
From:rburnett Date:March 30 2009 9:41pm
Subject:Connector/NET commit: r1532 - in branches/5.2: . MySql.Web/Providers/Source MySql.Web/Tests
View as plain text  
Modified:
   branches/5.2/CHANGES
   branches/5.2/MySql.Web/Providers/Source/RoleProvider.cs
   branches/5.2/MySql.Web/Tests/RoleManagement.cs
Log:
- Fixed RemoveUsersFromRoles and DeleteRole where they were not calling transactionscope.Complete.
  This meant that on systems where the provider tables are transaction aware the changes could be
  rolled back in every case (bug #43553)   


Modified: branches/5.2/CHANGES
===================================================================
--- branches/5.2/CHANGES	2009-03-30 20:23:37 UTC (rev 1531)
+++ branches/5.2/CHANGES	2009-03-30 21:41:35 UTC (rev 1532)
@@ -22,6 +22,9 @@
 - fixed MySqlDataReader.GetGuid to be more robust in how it attempts to read guid values (bug #41452)     
 - fixed bug where attempting to clear a pool twice would result in a null reference exception (bug #42801)    
 - Fixed problem with index column schema collection
+- Fixed RemoveUsersFromRoles and DeleteRole where they were not calling transactionscope.Complete.
+  This meant that on systems where the provider tables are transaction aware the changes could be
+  rolled back in every case (bug #43553)   
       
 Version 5.2.5 - 11/14/2008
 - fixed problem with package registration that kept the DDEX provider from working (bug #40726)

Modified: branches/5.2/MySql.Web/Providers/Source/RoleProvider.cs
===================================================================
--- branches/5.2/MySql.Web/Providers/Source/RoleProvider.cs	2009-03-30 20:23:37 UTC (rev 1531)
+++ branches/5.2/MySql.Web/Providers/Source/RoleProvider.cs	2009-03-30 21:41:35 UTC (rev 1532)
@@ -270,6 +270,7 @@
                             AND applicationId=@appId";
                         cmd.ExecuteNonQuery();
                     }
+                    ts.Complete();
                 }
             }
             catch (Exception ex)
@@ -444,6 +445,7 @@
                             }
                         }
                     }
+                    ts.Complete();
                 }
             }
             catch (MySqlException e)

Modified: branches/5.2/MySql.Web/Tests/RoleManagement.cs
===================================================================
--- branches/5.2/MySql.Web/Tests/RoleManagement.cs	2009-03-30 20:23:37 UTC (rev 1531)
+++ branches/5.2/MySql.Web/Tests/RoleManagement.cs	2009-03-30 21:41:35 UTC (rev 1532)
@@ -97,6 +97,9 @@
             roleProvider.AddUsersToRoles(new string[] { "eve" },
                 new string[] { "Administrator" });
             Assert.IsTrue(roleProvider.IsUserInRole("eve", "Administrator"));
+
+            roleProvider.RemoveUsersFromRoles(new string[] { "eve" }, new string[] { "Administrator" });
+            Assert.IsFalse(roleProvider.IsUserInRole("eve", "Administrator"));
         }
 
         /// <summary>

Thread
Connector/NET commit: r1532 - in branches/5.2: . MySql.Web/Providers/Source MySql.Web/Testsrburnett30 Mar