Author: ilya
Date: 2007-03-27 06:23:37 -0500 (Tue, 27 Mar 2007)
New Revision: 75013

Modified:
   
trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.J2EE.WAS/Mainsoft.Web.Profile/ChangeLog
   
trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.J2EE.WAS/Mainsoft.Web.Profile/WPProfileProvider.cs
   
trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.J2EE.WAS/Mainsoft.Web.Security/ChangeLog
   
trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.J2EE.WAS/Mainsoft.Web.Security/WPGroupsRoleProvider.cs
   
trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.J2EE.WAS/Mainsoft.Web.Security/WPMembershipProvider.cs
   
trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.J2EE.WAS/Mainsoft.Web.Security/WPMembershipUser.cs
Log:
Fixed hardcoded 'Name' properties in different providers. Fixes TD bug (7751)



Modified: 
trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.J2EE.WAS/Mainsoft.Web.Profile/ChangeLog
===================================================================
--- 
trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.J2EE.WAS/Mainsoft.Web.Profile/ChangeLog
   2007-03-27 11:07:03 UTC (rev 75012)
+++ 
trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.J2EE.WAS/Mainsoft.Web.Profile/ChangeLog
   2007-03-27 11:23:37 UTC (rev 75013)
@@ -1,3 +1,8 @@
+03-27-2007    Ilya Kharmatsky    <ilyak -at- mainsoft.com>
+
+       * WPProfileProvider.cs: removed hardcoded property 'Name', fixed by 
+       Konstantin Triger (kostat -at- mainsoft.com)
+
 03-06-2007    Ilya Kharmatsky    <ilyak -at- mainsoft.com>
        
        * WPUserProfile.cs: added support for PortalPreferences (defined in

Modified: 
trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.J2EE.WAS/Mainsoft.Web.Profile/WPProfileProvider.cs
===================================================================
--- 
trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.J2EE.WAS/Mainsoft.Web.Profile/WPProfileProvider.cs
        2007-03-27 11:07:03 UTC (rev 75012)
+++ 
trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.J2EE.WAS/Mainsoft.Web.Profile/WPProfileProvider.cs
        2007-03-27 11:23:37 UTC (rev 75013)
@@ -48,7 +48,6 @@
     public class WPProfileProvider : ProfileProvider
     {
         internal static readonly string DESCRIPTION = "WebSphere Portal 
Profile Provider";
-        internal static readonly string NAME = "WPProfileProvider";
 
         private static readonly string BIN_SERIALIZATION_PREFIX = 
"VMW_BIN_PREFIX:";
         private static readonly string BIN_SERIALIZATION_NULL = "#_NULL_#";
@@ -73,14 +72,6 @@
             }
         }
 
-        public override string Name
-        {
-            get
-            {
-                return NAME;
-            }
-        }
-
         public override string ApplicationName
         {
             get

Modified: 
trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.J2EE.WAS/Mainsoft.Web.Security/ChangeLog
===================================================================
--- 
trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.J2EE.WAS/Mainsoft.Web.Security/ChangeLog
  2007-03-27 11:07:03 UTC (rev 75012)
+++ 
trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.J2EE.WAS/Mainsoft.Web.Security/ChangeLog
  2007-03-27 11:23:37 UTC (rev 75013)
@@ -1,3 +1,11 @@
+03-27-2007      Ilya Kharmatsky    <ilyak -at- mainsoft.com>
+
+       * WPMembershipProvider.cs, WPGroupsRoleProvider.cs: removed hardcoded
+       property - 'Name', fix by Konstantin Triger (kostat -at- mainsoft.com)
+       * WPMembershipUser.cs : added reference to associated
+       MembershipProvider instance, in order to return non-hardcoded
+       provider's name.
+
 03-25-2007      Ilya Kharmatsky    <ilyak -at- mainsoft.com>
 
        * PumaServicesProvider.cs: spell error in exception msg fixed.

Modified: 
trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.J2EE.WAS/Mainsoft.Web.Security/WPGroupsRoleProvider.cs
===================================================================
--- 
trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.J2EE.WAS/Mainsoft.Web.Security/WPGroupsRoleProvider.cs
    2007-03-27 11:07:03 UTC (rev 75012)
+++ 
trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.J2EE.WAS/Mainsoft.Web.Security/WPGroupsRoleProvider.cs
    2007-03-27 11:23:37 UTC (rev 75013)
@@ -49,7 +49,6 @@
     {
         public static readonly string GROUP_NAMESPACE_ATTRIBUTE = 
"WPGroupsRoleNamespace";
         
-        private static readonly string PROVIDER_NAME = "WPGroupsRoleProvider";
         private static readonly string DESCRIPTION = "WebSphere Groups Role 
provider";
 
         private static readonly string VMW_STORED_IN_SESSION_ROLES = 
"VMW_CURR_USER_ROLES_";
@@ -66,14 +65,6 @@
             applicationName = config["applicationName"];
         }
 
-        public override string Name
-        {
-            get
-            {
-                return PROVIDER_NAME;
-            }
-        }
-
         public override string Description
         {
             get

Modified: 
trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.J2EE.WAS/Mainsoft.Web.Security/WPMembershipProvider.cs
===================================================================
--- 
trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.J2EE.WAS/Mainsoft.Web.Security/WPMembershipProvider.cs
    2007-03-27 11:07:03 UTC (rev 75012)
+++ 
trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.J2EE.WAS/Mainsoft.Web.Security/WPMembershipProvider.cs
    2007-03-27 11:23:37 UTC (rev 75013)
@@ -46,7 +46,6 @@
     public class WPMembershipProvider : MembershipProvider
     {
         private static readonly string PROVIDER_DESCRIPTION = "WebSphere 
Portal Membership Provider";
-        internal static readonly string PROVIDER_NAME = "WPMembershipProvider";
 
         private string applicationName;
 
@@ -104,11 +103,6 @@
             get { throw new NotImplementedException(); }
         }
 
-        public override string Name
-        {
-            get { return PROVIDER_NAME; }
-        }
-
         [MonoTODO]
         public override int PasswordAttemptWindow
         {
@@ -254,7 +248,7 @@
             java.util.List principles =  
provider.PumaLocator.findUsersByAttribute("uid", username);
             MembershipUser result = null;
             if (principles.size() > 0)
-                result = new 
WPMembershipUser((com.ibm.portal.um.User)principles.get(0));
+                result = new 
WPMembershipUser((com.ibm.portal.um.User)principles.get(0), this);
 
             return result;
 
@@ -298,7 +292,7 @@
          
             java.util.ArrayList sortedList = new 
java.util.ArrayList(principles.size());
             for (java.util.Iterator iter = principles.iterator(); 
iter.hasNext(); )
-                sortedList.add(new WPMembershipUser((User)iter.next()));
+                sortedList.add(new WPMembershipUser((User)iter.next(), this));
             
             java.util.Collections.sort(sortedList, 
WPMembershipUser.UserNameComparator);
 

Modified: 
trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.J2EE.WAS/Mainsoft.Web.Security/WPMembershipUser.cs
===================================================================
--- 
trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.J2EE.WAS/Mainsoft.Web.Security/WPMembershipUser.cs
        2007-03-27 11:07:03 UTC (rev 75012)
+++ 
trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.J2EE.WAS/Mainsoft.Web.Security/WPMembershipUser.cs
        2007-03-27 11:23:37 UTC (rev 75013)
@@ -42,21 +42,23 @@
     {
         private User _wpsUser;
         private string _userName;
+        private MembershipProvider _provider;
 
         private object _providerKey;
 
-        internal WPMembershipUser(User user)
+        internal WPMembershipUser(User user, MembershipProvider provider)
             : base()
         {
             if (user == null)
                 throw new ArgumentNullException("user");
 
+            _provider = provider;
             _wpsUser = user;
             InitAspNetProperties();
         }
 
-        internal WPMembershipUser(User user, object providerKye)
-            : this(user)
+        internal WPMembershipUser(User user, object providerKye, 
MembershipProvider provider)
+            : this(user, provider)
         {
             _providerKey = providerKye;
         }
@@ -87,7 +89,10 @@
         {
             get
             {
-                return WPMembershipProvider.PROVIDER_NAME;
+                if (_provider != null)
+                    return _provider.Name;
+                
+                return null;
             }
         }
 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to