2004-11-18 Lluis Sanchez Gual <lluis@novell.com>
authorLluis Sanchez <lluis@novell.com>
Thu, 18 Nov 2004 14:32:06 +0000 (14:32 -0000)
committerLluis Sanchez <lluis@novell.com>
Thu, 18 Nov 2004 14:32:06 +0000 (14:32 -0000)
* RoleProvider.cs, Roles.cs, SqlRoleProvider.cs, RoleProviderCollection.cs,
AccessRoleProvider.cs: IRoleProvider has been renamed to ProviderBase.
* IMembershipProvider.cs: Deleted.
* MembershipProvider.cs, AccessMembershipProvider.cs, MembershipUser.cs,
Membership.cs, ADMembershipProvider.cs, SqlMembershipProvider.cs
MembershipProviderCollection.cs: MembershipProvider has been deleted
and replaced by the abstract class MembershipProvider.
* MembershipProviderCollection.cs: Minor fixes.
* ADMembershipProvider.cs: Renamed to ActiveDirectoryMembershipProvider.cs.

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

16 files changed:
1  2 
mcs/class/System.Web/System.Web.Security/ADMembershipProvider.cs
mcs/class/System.Web/System.Web.Security/AccessMembershipProvider.cs
mcs/class/System.Web/System.Web.Security/AccessRoleProvider.cs
mcs/class/System.Web/System.Web.Security/ActiveDirectoryMembershipProvider.cs
mcs/class/System.Web/System.Web.Security/ChangeLog
mcs/class/System.Web/System.Web.Security/IMembershipProvider.cs
mcs/class/System.Web/System.Web.Security/IRoleProvider.cs
mcs/class/System.Web/System.Web.Security/Membership.cs
mcs/class/System.Web/System.Web.Security/MembershipProvider.cs
mcs/class/System.Web/System.Web.Security/MembershipProviderCollection.cs
mcs/class/System.Web/System.Web.Security/MembershipUser.cs
mcs/class/System.Web/System.Web.Security/RoleProvider.cs
mcs/class/System.Web/System.Web.Security/RoleProviderCollection.cs
mcs/class/System.Web/System.Web.Security/Roles.cs
mcs/class/System.Web/System.Web.Security/SqlMembershipProvider.cs
mcs/class/System.Web/System.Web.Security/SqlRoleProvider.cs

diff --cc mcs/class/System.Web/System.Web.Security/ADMembershipProvider.cs
index ded8445acd64bafb0b06e126f1ffbd331e20b45a,ded8445acd64bafb0b06e126f1ffbd331e20b45a..0000000000000000000000000000000000000000
deleted file mode 100644,100644
+++ /dev/null
@@@ -1,166 -1,166 +1,0 @@@
--//
--// System.Web.Security.ADMembershipProvider
--//
--// Authors:
--//    Ben Maurer (bmaurer@users.sourceforge.net)
--//
--// (C) 2003 Ben Maurer
--//
--
--//
--// Permission is hereby granted, free of charge, to any person obtaining
--// a copy of this software and associated documentation files (the
--// "Software"), to deal in the Software without restriction, including
--// without limitation the rights to use, copy, modify, merge, publish,
--// distribute, sublicense, and/or sell copies of the Software, and to
--// permit persons to whom the Software is furnished to do so, subject to
--// the following conditions:
--// 
--// The above copyright notice and this permission notice shall be
--// included in all copies or substantial portions of the Software.
--// 
--// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
--// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
--// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
--// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
--// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
--// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
--// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--//
--
--#if NET_2_0
--using System.Collections;
--using System.Collections.Specialized;
--using System.Text;
--
--namespace System.Web.Security {
--      public class ADMembershipProvider : IMembershipProvider {
--              
--              [MonoTODO]
--              public virtual bool ChangePassword (string username, string oldPwd, string newPwd)
--              {
--                      throw new NotImplementedException ();
--              }
--              
--              [MonoTODO]
--              public virtual bool ChangePasswordQuestionAndAnswer (string username, string password, string newPwdQuestion, string newPwdAnswer)
--              {
--                      throw new NotImplementedException ();
--              }
--              
--              [MonoTODO]
--              public virtual MembershipUser CreateUser (string username, string password, string email,  out MembershipCreateStatus status)
--              {
--                      throw new NotImplementedException ();
--              }
--              
--              [MonoTODO]
--              public virtual bool DeleteUser (string username)
--              {
--                      throw new NotImplementedException ();
--              }
--              
--              [MonoTODO]
--              public virtual string GeneratePassword ()
--              {
--                      throw new NotImplementedException ();
--              }
--              
--              [MonoTODO]
--              public MembershipUserCollection GetAllUsers ()
--              {
--                      throw new NotImplementedException ();
--              }
--              
--              [MonoTODO]
--              public int GetNumberOfUsersOnline ()
--              {
--                      throw new NotImplementedException ();
--              }
--              
--              [MonoTODO]
--              public virtual string GetPassword (string username, string answer)
--              {
--                      throw new NotImplementedException ();
--              }
--              
--              [MonoTODO]
--              public virtual MembershipUser GetUser (string username, bool userIsOnline)
--              {
--                      throw new NotImplementedException ();
--              }
--              
--              [MonoTODO]
--              public virtual string GetUserNameByEmail (string email)
--              {
--                      throw new NotImplementedException ();
--              }
--              
--              [MonoTODO]
--              public virtual void Initialize (string name, NameValueCollection config)
--              {
--                      throw new NotImplementedException ();
--              }
--              
--              [MonoTODO]
--              public virtual string ResetPassword (string username, string answer)
--              {
--                      throw new NotImplementedException ();
--              }
--              
--              [MonoTODO]
--              public virtual void UpdateUser (MembershipUser user)
--              {
--                      throw new NotImplementedException ();
--              }
--              
--              [MonoTODO]
--              public virtual bool ValidateUser (string username, string password)
--              {
--                      throw new NotImplementedException ();
--              }
--              
--              [MonoTODO]
--              public string ApplicationName {
--                      get { throw new NotImplementedException (); }
--                      set { throw new NotImplementedException (); }
--              }
--              
--              [MonoTODO]
--              public virtual string Description {
--                      get { throw new NotImplementedException (); }
--              }
--              
--              [MonoTODO]
--              public virtual bool EnablePasswordReset {
--                      get { throw new NotImplementedException (); }
--              }
--              
--              [MonoTODO]
--              public virtual bool EnablePasswordRetrieval {
--                      get { throw new NotImplementedException (); }
--              }
--              
--              [MonoTODO]
--              public virtual string Name {
--                      get { throw new NotImplementedException (); }
--              }
--              
--              [MonoTODO]
--              public virtual MembershipPasswordFormat PasswordFormat {
--                      get { throw new NotImplementedException (); }
--              }
--              
--              [MonoTODO]
--              public virtual bool RequiresQuestionAndAnswer {
--                      get { throw new NotImplementedException (); }
--              }
--              
--              [MonoTODO]
--              public virtual bool RequiresUniqueEmail {
--                      get { throw new NotImplementedException (); }
--              }
--      }
--}
--#endif
--
index 3aa498517cdabfb726b7271ab5d6f248edc665cd,3aa498517cdabfb726b7271ab5d6f248edc665cd..ec65c4235b1c99351e8741683a6302128d21647e
@@@ -3,6 -3,6 +3,7 @@@
  //
  // Authors:
  //    Ben Maurer (bmaurer@users.sourceforge.net)
++//    Lluis Sanchez Gual (lluis@novell.com)
  //
  // (C) 2003 Ben Maurer
  //
@@@ -34,28 -34,28 +35,28 @@@ using System.Collections.Specialized
  using System.Text;
  
  namespace System.Web.Security {
--      public class AccessMembershipProvider : IMembershipProvider {
++      public class AccessMembershipProvider : MembershipProvider {
                
                [MonoTODO]
--              public virtual bool ChangePassword (string username, string oldPwd, string newPwd)
++              public override bool ChangePassword (string username, string oldPwd, string newPwd)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public virtual bool ChangePasswordQuestionAndAnswer (string username, string password, string newPwdQuestion, string newPwdAnswer)
++              public override bool ChangePasswordQuestionAndAnswer (string username, string password, string newPwdQuestion, string newPwdAnswer)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public virtual MembershipUser CreateUser (string username, string password, string email,  out MembershipCreateStatus status)
++              public override MembershipUser CreateUser (string username, string password, string email, string pwdQuestion, string pwdAnswer, bool isApproved, out MembershipCreateStatus status)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public virtual bool DeleteUser (string username)
++              public override bool DeleteUser (string username, bool deleteAllRelatedData)
                {
                        throw new NotImplementedException ();
                }
                }
                
                [MonoTODO]
--              public MembershipUserCollection GetAllUsers ()
++              public override MembershipUserCollection FindUsersByEmail (string emailToMatch, int pageIndex, int pageSize, out int totalRecords)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public int GetNumberOfUsersOnline ()
++              public override MembershipUserCollection FindUsersByName (string nameToMatch, int pageIndex, int pageSize, out int totalRecords)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public virtual string GetPassword (string username, string answer)
++              public override MembershipUserCollection GetAllUsers (int pageIndex, int pageSize, out int totalRecords)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public virtual MembershipUser GetUser (string username, bool userIsOnline)
++              public override int GetNumberOfUsersOnline ()
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public virtual string GetUserNameByEmail (string email)
++              public override string GetPassword (string username, string answer)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public virtual void Initialize (string name, NameValueCollection config)
++              public override MembershipUser GetUser (string username, bool userIsOnline)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public virtual string ResetPassword (string username, string answer)
++              public override string GetUserNameByEmail (string email)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public virtual void UpdateUser (MembershipUser user)
++              public override void Initialize (string name, NameValueCollection config)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public virtual bool ValidateUser (string username, string password)
++              public override string ResetPassword (string username, string answer)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public string ApplicationName {
--                      get { throw new NotImplementedException (); }
--                      set { throw new NotImplementedException (); }
++              public override void UpdateUser (MembershipUser user)
++              {
++                      throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public virtual string Description {
++              public override bool ValidateUser (string username, string password)
++              {
++                      throw new NotImplementedException ();
++              }
++              
++              [MonoTODO]
++              public override string ApplicationName {
                        get { throw new NotImplementedException (); }
++                      set { throw new NotImplementedException (); }
                }
                
                [MonoTODO]
--              public virtual bool EnablePasswordReset {
++              public virtual string Description {
                        get { throw new NotImplementedException (); }
                }
                
                [MonoTODO]
--              public virtual bool EnablePasswordRetrieval {
++              public override bool EnablePasswordReset {
                        get { throw new NotImplementedException (); }
                }
                
                [MonoTODO]
--              public virtual string Name {
++              public override bool EnablePasswordRetrieval {
                        get { throw new NotImplementedException (); }
                }
                
                }
                
                [MonoTODO]
--              public virtual bool RequiresQuestionAndAnswer {
++              public override bool RequiresQuestionAndAnswer {
                        get { throw new NotImplementedException (); }
                }
                
index d18b5ae518ecc35296c137f467bc8be1190f3cad,d18b5ae518ecc35296c137f467bc8be1190f3cad..68c4218253629ec3195ce0d8d7eb5ffb4870e09a
@@@ -34,81 -34,81 +34,82 @@@ using System.Collections.Specialized
  using System.Text;
  
  namespace System.Web.Security {
--      public class AccessRoleProvider {
++      public class AccessRoleProvider: RoleProvider {
                
                [MonoTODO]
--              public void AddUsersToRoles (string [] usernames, string [] rolenames)
++              public override void AddUsersToRoles (string [] usernames, string [] rolenames)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public void CreateRole (string rolename)
++              public override void CreateRole (string rolename)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public void DeleteRole (string rolename)
++              public override void DeleteRole (string rolename, bool throwOnPopulatedRole)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public string [] GetAllRoles ()
++              public override void FindUsersInRole (string roleName, string usernameToMatch)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public string [] GetRolesForUser (string username)
++              public override string [] GetAllRoles ()
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public string [] GetUsersInRole (string rolename)
++              public override string [] GetRolesForUser (string username)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public virtual void Initialize (string name, NameValueCollection config)
++              public override string [] GetUsersInRole (string rolename)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public bool IsUserInRole (string username, string rolename)
++              public override void Initialize (string name, NameValueCollection config)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public void RemoveUsersFromRoles (string [] usernames, string [] rolenames)
++              public override bool IsUserInRole (string username, string rolename)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public bool RoleExists (string rolename)
++              public override void RemoveUsersFromRoles (string [] usernames, string [] rolenames)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public string ApplicationName {
--                      get { throw new NotImplementedException (); }
--                      set { throw new NotImplementedException (); }
++              public override bool RoleExists (string rolename)
++              {
++                      throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public virtual string Description {
++              public override string ApplicationName {
                        get { throw new NotImplementedException (); }
++                      set { throw new NotImplementedException (); }
                }
                
                [MonoTODO]
--              public virtual string Name {
++              public virtual string Description {
                        get { throw new NotImplementedException (); }
                }
        }
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..3e91ccd9fbf5737b599f8826a9bb1b6f206e0121
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,174 @@@
++//
++// System.Web.Security.ActiveDirectoryMembershipProvider
++//
++// Authors:
++//    Ben Maurer (bmaurer@users.sourceforge.net)
++//    Lluis Sanchez Gual (lluis@novell.com)
++//
++// (C) 2003 Ben Maurer
++//
++
++//
++// Permission is hereby granted, free of charge, to any person obtaining
++// a copy of this software and associated documentation files (the
++// "Software"), to deal in the Software without restriction, including
++// without limitation the rights to use, copy, modify, merge, publish,
++// distribute, sublicense, and/or sell copies of the Software, and to
++// permit persons to whom the Software is furnished to do so, subject to
++// the following conditions:
++// 
++// The above copyright notice and this permission notice shall be
++// included in all copies or substantial portions of the Software.
++// 
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++//
++
++#if NET_2_0
++using System.Collections;
++using System.Collections.Specialized;
++using System.Text;
++
++namespace System.Web.Security {
++      public class ActiveDirectoryMembershipProvider : MembershipProvider {
++              
++              [MonoTODO]
++              public override bool ChangePassword (string username, string oldPwd, string newPwd)
++              {
++                      throw new NotImplementedException ();
++              }
++              
++              [MonoTODO]
++              public override bool ChangePasswordQuestionAndAnswer (string username, string password, string newPwdQuestion, string newPwdAnswer)
++              {
++                      throw new NotImplementedException ();
++              }
++              
++              [MonoTODO]
++              public override MembershipUser CreateUser (string username, string password, string email, string pwdQuestion, string pwdAnswer, bool isApproved, out MembershipCreateStatus status)
++              {
++                      throw new NotImplementedException ();
++              }
++              
++              [MonoTODO]
++              public override bool DeleteUser (string username, bool deleteAllRelatedData)
++              {
++                      throw new NotImplementedException ();
++              }
++              
++              [MonoTODO]
++              public virtual string GeneratePassword ()
++              {
++                      throw new NotImplementedException ();
++              }
++              
++              [MonoTODO]
++              public override MembershipUserCollection FindUsersByEmail (string emailToMatch, int pageIndex, int pageSize, out int totalRecords)
++              {
++                      throw new NotImplementedException ();
++              }
++              
++              [MonoTODO]
++              public override MembershipUserCollection FindUsersByName (string nameToMatch, int pageIndex, int pageSize, out int totalRecords)
++              {
++                      throw new NotImplementedException ();
++              }
++              
++              [MonoTODO]
++              public override MembershipUserCollection GetAllUsers (int pageIndex, int pageSize, out int totalRecords)
++              {
++                      throw new NotImplementedException ();
++              }
++              
++              [MonoTODO]
++              public override int GetNumberOfUsersOnline ()
++              {
++                      throw new NotImplementedException ();
++              }
++              
++              [MonoTODO]
++              public override string GetPassword (string username, string answer)
++              {
++                      throw new NotImplementedException ();
++              }
++              
++              [MonoTODO]
++              public override MembershipUser GetUser (string username, bool userIsOnline)
++              {
++                      throw new NotImplementedException ();
++              }
++              
++              [MonoTODO]
++              public override string GetUserNameByEmail (string email)
++              {
++                      throw new NotImplementedException ();
++              }
++              
++              [MonoTODO]
++              public override void Initialize (string name, NameValueCollection config)
++              {
++                      throw new NotImplementedException ();
++              }
++              
++              [MonoTODO]
++              public override string ResetPassword (string username, string answer)
++              {
++                      throw new NotImplementedException ();
++              }
++              
++              [MonoTODO]
++              public override void UpdateUser (MembershipUser user)
++              {
++                      throw new NotImplementedException ();
++              }
++              
++              [MonoTODO]
++              public override bool ValidateUser (string username, string password)
++              {
++                      throw new NotImplementedException ();
++              }
++              
++              [MonoTODO]
++              public override string ApplicationName {
++                      get { throw new NotImplementedException (); }
++                      set { throw new NotImplementedException (); }
++              }
++              
++              [MonoTODO]
++              public virtual string Description {
++                      get { throw new NotImplementedException (); }
++              }
++              
++              [MonoTODO]
++              public override bool EnablePasswordReset {
++                      get { throw new NotImplementedException (); }
++              }
++              
++              [MonoTODO]
++              public override bool EnablePasswordRetrieval {
++                      get { throw new NotImplementedException (); }
++              }
++              
++              [MonoTODO]
++              public virtual MembershipPasswordFormat PasswordFormat {
++                      get { throw new NotImplementedException (); }
++              }
++              
++              [MonoTODO]
++              public override bool RequiresQuestionAndAnswer {
++                      get { throw new NotImplementedException (); }
++              }
++              
++              [MonoTODO]
++              public virtual bool RequiresUniqueEmail {
++                      get { throw new NotImplementedException (); }
++              }
++      }
++}
++#endif
++
index 1e896bd4dd9daf6e65375a3a4ab74df678f5de88,73d0df19764e5363bb7e9bc78a86bb9ce6871ed7..94f51271c85e2d4996fea55c521dee5fe0fb4118
@@@ -1,7 -1,3 +1,19 @@@
++2004-11-18 Lluis Sanchez Gual <lluis@novell.com>
++
++      * RoleProvider.cs, Roles.cs, SqlRoleProvider.cs, RoleProviderCollection.cs,
++      AccessRoleProvider.cs: IRoleProvider has been renamed to ProviderBase.
++      * IMembershipProvider.cs: Deleted.
++      * MembershipProvider.cs, AccessMembershipProvider.cs, MembershipUser.cs,
++      Membership.cs, ADMembershipProvider.cs, SqlMembershipProvider.cs
++      MembershipProviderCollection.cs: MembershipProvider has been deleted
++      and replaced by the abstract class MembershipProvider.
++      * MembershipProviderCollection.cs: Minor fixes.
++      * ADMembershipProvider.cs: Renamed to ActiveDirectoryMembershipProvider.cs.
++
 +2004-11-15 Lluis Sanchez Gual <lluis@novell.com>
 +
 +      * RoleProviderCollection.cs, MembershipProviderCollection.cs: 
 +      Fixed warnings.
  
  2004-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
  
diff --cc mcs/class/System.Web/System.Web.Security/IMembershipProvider.cs
index 23bda61ec974747f1e9f0e0272e3a7a44e6bde21,23bda61ec974747f1e9f0e0272e3a7a44e6bde21..0000000000000000000000000000000000000000
deleted file mode 100644,100644
+++ /dev/null
@@@ -1,55 -1,55 +1,0 @@@
--//
--// System.Web.Security.IMembershipProvider
--//
--// Authors:
--//    Ben Maurer (bmaurer@users.sourceforge.net)
--//
--// (C) 2003 Ben Maurer
--//
--
--//
--// Permission is hereby granted, free of charge, to any person obtaining
--// a copy of this software and associated documentation files (the
--// "Software"), to deal in the Software without restriction, including
--// without limitation the rights to use, copy, modify, merge, publish,
--// distribute, sublicense, and/or sell copies of the Software, and to
--// permit persons to whom the Software is furnished to do so, subject to
--// the following conditions:
--// 
--// The above copyright notice and this permission notice shall be
--// included in all copies or substantial portions of the Software.
--// 
--// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
--// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
--// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
--// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
--// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
--// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
--// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--//
--
--#if NET_2_0
--using System.Configuration.Provider;
--
--namespace System.Web.Security {
--      public interface IMembershipProvider : IProvider {
--              bool ChangePassword (string name, string oldPwd, string newPwd);
--              bool ChangePasswordQuestionAndAnswer (string name, string password, string newPwdQuestion, string newPwdAnswer);
--              MembershipUser CreateUser (string username, string password, string email, out MembershipCreateStatus status);
--              bool DeleteUser (string name);
--              MembershipUserCollection GetAllUsers ();
--              int GetNumberOfUsersOnline ();
--              string GetPassword (string name, string answer);
--              MembershipUser GetUser (string name, bool userIsOnline);
--              string GetUserNameByEmail (string email);
--              string ResetPassword (string name, string answer);
--              void UpdateUser (MembershipUser user);
--              bool ValidateUser (string name, string password);
--              string ApplicationName { get; set; }
--              bool EnablePasswordReset { get; }
--              bool EnablePasswordRetrieval { get; }
--              bool RequiresQuestionAndAnswer { get; }
--      }
--}
--#endif
--
diff --cc mcs/class/System.Web/System.Web.Security/IRoleProvider.cs
index 28c7582104b402f08b5404ae99db0013ad1e457b,28c7582104b402f08b5404ae99db0013ad1e457b..0000000000000000000000000000000000000000
deleted file mode 100644,100644
+++ /dev/null
@@@ -1,49 -1,49 +1,0 @@@
--//
--// System.Web.Security.IRoleProvider
--//
--// Authors:
--//    Ben Maurer (bmaurer@users.sourceforge.net)
--//
--// (C) 2003 Ben Maurer
--//
--
--//
--// Permission is hereby granted, free of charge, to any person obtaining
--// a copy of this software and associated documentation files (the
--// "Software"), to deal in the Software without restriction, including
--// without limitation the rights to use, copy, modify, merge, publish,
--// distribute, sublicense, and/or sell copies of the Software, and to
--// permit persons to whom the Software is furnished to do so, subject to
--// the following conditions:
--// 
--// The above copyright notice and this permission notice shall be
--// included in all copies or substantial portions of the Software.
--// 
--// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
--// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
--// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
--// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
--// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
--// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
--// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--//
--
--#if NET_2_0
--using System.Configuration.Provider;
--
--namespace System.Web.Security {
--      public interface IRoleProvider : IProvider {
--              void AddUsersToRoles (string [] usernames, string [] rolenames);
--              void CreateRole (string rolename);
--              void DeleteRole (string rolename);
--              string [] GetAllRoles ();
--              string [] GetRolesForUser (string username);
--              string [] GetUsersInRole (string rolename);
--              bool IsUserInRole (string username, string rolename);
--              void RemoveUsersFromRoles (string [] usernames, string [] rolenames);
--              bool RoleExists (string rolename);
--              string ApplicationName { get; set; }
--      }
--}
--#endif
--
index f68d48646ec3943743e0dceb2ce3309ff6c10285,f68d48646ec3943743e0dceb2ce3309ff6c10285..c272ef268907daf8c1b3115308e6635226788531
@@@ -36,6 -36,6 +36,8 @@@ using System.Text
  namespace System.Web.Security {
        public sealed class Membership {
                
++              private Membership () {}
++              
                public static MembershipUser CreateUser (string username, string password)
                {
                        return CreateUser (username, password, null);
                public static MembershipUser CreateUser (string username, string password, string email)
                {
                        MembershipCreateStatus status;
--                      MembershipUser usr = CreateUser (username, password, email, out status);
++                      MembershipUser usr = CreateUser (username, password, email, null, null, true, out status);
                        if (usr == null)
                                throw new MembershipCreateUserException (status);
                        
                        return usr;
                }
                
--              public static MembershipUser CreateUser (string username, string password, string email, out MembershipCreateStatus status)
++              public static MembershipUser CreateUser (string username, string password, string email, string pwdQuestion, string pwdAnswer, bool isApproved, out MembershipCreateStatus status)
                {
--                      return Provider.CreateUser (username, password, email, out status);
++                      return Provider.CreateUser (username, password, email, pwdQuestion, pwdAnswer, isApproved, out status);
                }
                
                public static bool DeleteUser (string username)
                {
--                      return Provider.DeleteUser (username);
++                      return Provider.DeleteUser (username, true);
++              }
++              
++              public static bool DeleteUser (string username, bool deleteAllRelatedData)
++              {
++                      return Provider.DeleteUser (username, deleteAllRelatedData);
                }
                
                [MonoTODO]
                
                public static MembershipUserCollection GetAllUsers ()
                {
--                      return Provider.GetAllUsers ();
++                      int total;
++                      return GetAllUsers (1, int.MaxValue, out total);
++              }
++              
++              public static MembershipUserCollection GetAllUsers (int pageIndex, int pageSize, out int totalRecords)
++              {
++                      return Provider.GetAllUsers (pageIndex, pageSize, out totalRecords);
                }
                
                public static int GetNumberOfUsersOnline ()
                }
                
                [MonoTODO]
--              public static IMembershipProvider Provider {
++              public static MembershipProvider Provider {
                        get { throw new NotImplementedException (); }
                }
                
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..80a92d44586c60cb9ea093f6024106c197360d1b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,64 @@@
++//
++// System.Web.Security.IMembershipProvider
++//
++// Authors:
++//    Ben Maurer (bmaurer@users.sourceforge.net)
++//    Lluis Sanchez Gual (lluis@novell.com)
++//
++// (C) 2003 Ben Maurer
++//
++
++//
++// Permission is hereby granted, free of charge, to any person obtaining
++// a copy of this software and associated documentation files (the
++// "Software"), to deal in the Software without restriction, including
++// without limitation the rights to use, copy, modify, merge, publish,
++// distribute, sublicense, and/or sell copies of the Software, and to
++// permit persons to whom the Software is furnished to do so, subject to
++// the following conditions:
++// 
++// The above copyright notice and this permission notice shall be
++// included in all copies or substantial portions of the Software.
++// 
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++//
++
++#if NET_2_0
++using System.Configuration.Provider;
++
++namespace System.Web.Security
++{
++      public abstract class MembershipProvider : ProviderBase
++      {
++              protected MembershipProvider ()
++              {
++              }
++              
++              public abstract bool ChangePassword (string name, string oldPwd, string newPwd);
++              public abstract bool ChangePasswordQuestionAndAnswer (string name, string password, string newPwdQuestion, string newPwdAnswer);
++              public abstract MembershipUser CreateUser (string username, string password, string email, string pwdQuestion, string pwdAnswer, bool isApproved, out MembershipCreateStatus status);
++              public abstract bool DeleteUser (string name, bool deleteAllRelatedData);
++              public abstract MembershipUserCollection FindUsersByEmail (string emailToMatch, int pageIndex, int pageSize, out int totalRecords);
++              public abstract MembershipUserCollection FindUsersByName (string nameToMatch, int pageIndex, int pageSize, out int totalRecords);
++              public abstract MembershipUserCollection GetAllUsers (int pageIndex, int pageSize, out int totalRecords);
++              public abstract int GetNumberOfUsersOnline ();
++              public abstract string GetPassword (string name, string answer);
++              public abstract MembershipUser GetUser (string name, bool userIsOnline);
++              public abstract string GetUserNameByEmail (string email);
++              public abstract string ResetPassword (string name, string answer);
++              public abstract void UpdateUser (MembershipUser user);
++              public abstract bool ValidateUser (string name, string password);
++              public abstract string ApplicationName { get; set; }
++              public abstract bool EnablePasswordReset { get; }
++              public abstract bool EnablePasswordRetrieval { get; }
++              public abstract bool RequiresQuestionAndAnswer { get; }
++      }
++}
++#endif
++
index ff405c1c0eb7a488c35e0042cfef07713085c532,ba3f6f518f290e27c9623c6d61b0342fb635ee20..28748fe6e69e3ef46ac6b519f2e052a3104d2730
@@@ -33,16 -33,16 +33,16 @@@ using System.Configuration.Provider
  
  namespace System.Web.Security {
        public class MembershipProviderCollection : ProviderCollection {
--              public override void Add (IProvider provider)
++              public override void Add (ProviderBase provider)
                {
--                      if (provider is IMembershipProvider)
++                      if (provider is MembershipProvider)
                                base.Add (provider);
                        else
                                throw new HttpException ();
                }
                
-               public new IMembershipProvider this [string name] {
 -              public IMembershipProvider this [string name] {
--                      get { return (IMembershipProvider) base [name]; }
++              public new MembershipProvider this [string name] {
++                      get { return (MembershipProvider) base [name]; }
                }
        }
  }
index a17acc8ccdecf2baaf7e0fe5299db944fe613512,a17acc8ccdecf2baaf7e0fe5299db944fe613512..e2d3a93feea595f799b23b16017efaca5a63325b
@@@ -35,7 -35,7 +35,7 @@@ namespace System.Web.Security 
                {
                }
                
--              public MembershipUser (IMembershipProvider provider, string name, string email,
++              public MembershipUser (MembershipProvider provider, string name, string email,
                        string passwordQuestion, string comment, bool isApproved,
                        DateTime creationDate, DateTime lastLoginDate, DateTime lastActivityDate,
                        DateTime lastPasswordChangedDate)
                        get { return passwordQuestion; }
                }
                
--              public virtual IMembershipProvider Provider {
++              public virtual MembershipProvider Provider {
                        get { return provider; }
                }
                
                        get { return name; }
                }
                
--              IMembershipProvider provider;
++              MembershipProvider provider;
                string name;
                string email;
                string passwordQuestion;
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..1ed6c098e287c1aae98ae16caceeb27e287bc78e
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,56 @@@
++//
++// System.Web.Security.IRoleProvider
++//
++// Authors:
++//    Ben Maurer (bmaurer@users.sourceforge.net)
++//
++// (C) 2003 Ben Maurer
++//
++
++//
++// Permission is hereby granted, free of charge, to any person obtaining
++// a copy of this software and associated documentation files (the
++// "Software"), to deal in the Software without restriction, including
++// without limitation the rights to use, copy, modify, merge, publish,
++// distribute, sublicense, and/or sell copies of the Software, and to
++// permit persons to whom the Software is furnished to do so, subject to
++// the following conditions:
++// 
++// The above copyright notice and this permission notice shall be
++// included in all copies or substantial portions of the Software.
++// 
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++//
++
++#if NET_2_0
++using System.Configuration.Provider;
++
++namespace System.Web.Security
++{
++      public abstract class RoleProvider : ProviderBase
++      {
++              protected RoleProvider ()
++              {
++              }
++              
++              public abstract void AddUsersToRoles (string [] usernames, string [] rolenames);
++              public abstract void CreateRole (string rolename);
++              public abstract void DeleteRole (string rolename, bool throwOnPopulatedRole);
++              public abstract void FindUsersInRole (string roleName, string usernameToMatch);
++              public abstract string [] GetAllRoles ();
++              public abstract string [] GetRolesForUser (string username);
++              public abstract string [] GetUsersInRole (string rolename);
++              public abstract bool IsUserInRole (string username, string rolename);
++              public abstract void RemoveUsersFromRoles (string [] usernames, string [] rolenames);
++              public abstract bool RoleExists (string rolename);
++              public abstract string ApplicationName { get; set; }
++      }
++}
++#endif
++
index 2a8e978f4b462883232c9ce55cf64ca8fb54ef85,28908bf68003c1e8e95e71d5fbc0eccba9fd2f8c..dcb28f362f7c81d900f589636d34d1d1d631135c
@@@ -33,16 -33,16 +33,16 @@@ using System.Configuration.Provider
  
  namespace System.Web.Security {
        public class RoleProviderCollection : ProviderCollection {
--              public override void Add (IProvider provider)
++              public override void Add (ProviderBase provider)
                {
--                      if (provider is IRoleProvider)
++                      if (provider is RoleProvider)
                                base.Add (provider);
                        else
                                throw new HttpException ();
                }
                
-               public new IRoleProvider this [string name] {
 -              public IRoleProvider this [string name] {
--                      get { return (IRoleProvider) base [name]; }
++              public new RoleProvider this [string name] {
++                      get { return (RoleProvider) base [name]; }
                }
        }
  }
index 8d18302ecec78d9c458fa8857fb5b58f3016f894,8d18302ecec78d9c458fa8857fb5b58f3016f894..17950833c9c9c8d023e467fdd82a9316d3406b5d
@@@ -191,7 -191,7 +191,7 @@@ namespace System.Web.Security 
                }
                
                [MonoTODO]
--              public static IRoleProvider Provider {
++              public static RoleProvider Provider {
                        get { throw new NotImplementedException (); }
                }
                
index 847d1b73de6afacb0a9a08492b3e66ed0ab3203d,847d1b73de6afacb0a9a08492b3e66ed0ab3203d..3437bd31a26ddf7ddff5dca5db4ff35e58ddad59
@@@ -3,6 -3,6 +3,7 @@@
  //
  // Authors:
  //    Ben Maurer (bmaurer@users.sourceforge.net)
++//    Lluis Sanchez Gual (lluis@novell.com)
  //
  // (C) 2003 Ben Maurer
  //
@@@ -34,28 -34,28 +35,28 @@@ using System.Collections.Specialized
  using System.Text;
  
  namespace System.Web.Security {
--      public class SqlMembershipProvider : IMembershipProvider {
++      public class SqlMembershipProvider : MembershipProvider {
                
                [MonoTODO]
--              public virtual bool ChangePassword (string username, string oldPwd, string newPwd)
++              public override bool ChangePassword (string username, string oldPwd, string newPwd)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public virtual bool ChangePasswordQuestionAndAnswer (string username, string password, string newPwdQuestion, string newPwdAnswer)
++              public override bool ChangePasswordQuestionAndAnswer (string username, string password, string newPwdQuestion, string newPwdAnswer)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public virtual MembershipUser CreateUser (string username, string password, string email,  out MembershipCreateStatus status)
++              public override MembershipUser CreateUser (string username, string password, string email, string pwdQuestion, string pwdAnswer, bool isApproved, out MembershipCreateStatus status)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public virtual bool DeleteUser (string username)
++              public override bool DeleteUser (string username, bool deleteAllRelatedData)
                {
                        throw new NotImplementedException ();
                }
                }
                
                [MonoTODO]
--              public MembershipUserCollection GetAllUsers ()
++              public override MembershipUserCollection FindUsersByEmail (string emailToMatch, int pageIndex, int pageSize, out int totalRecords)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public int GetNumberOfUsersOnline ()
++              public override MembershipUserCollection FindUsersByName (string nameToMatch, int pageIndex, int pageSize, out int totalRecords)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public virtual string GetPassword (string username, string answer)
++              public override MembershipUserCollection GetAllUsers (int pageIndex, int pageSize, out int totalRecords)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public virtual MembershipUser GetUser (string username, bool userIsOnline)
++              public override int GetNumberOfUsersOnline ()
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public virtual string GetUserNameByEmail (string email)
++              public override string GetPassword (string username, string answer)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public virtual void Initialize (string name, NameValueCollection config)
++              public override MembershipUser GetUser (string username, bool userIsOnline)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public virtual string ResetPassword (string username, string answer)
++              public override string GetUserNameByEmail (string email)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public virtual void UpdateUser (MembershipUser user)
++              public override void Initialize (string name, NameValueCollection config)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public virtual bool ValidateUser (string username, string password)
++              public override string ResetPassword (string username, string answer)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public string ApplicationName {
--                      get { throw new NotImplementedException (); }
--                      set { throw new NotImplementedException (); }
++              public override void UpdateUser (MembershipUser user)
++              {
++                      throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public virtual string Description {
++              public override bool ValidateUser (string username, string password)
++              {
++                      throw new NotImplementedException ();
++              }
++              
++              [MonoTODO]
++              public override string ApplicationName {
                        get { throw new NotImplementedException (); }
++                      set { throw new NotImplementedException (); }
                }
                
                [MonoTODO]
--              public virtual bool EnablePasswordReset {
++              public virtual string Description {
                        get { throw new NotImplementedException (); }
                }
                
                [MonoTODO]
--              public virtual bool EnablePasswordRetrieval {
++              public override bool EnablePasswordReset {
                        get { throw new NotImplementedException (); }
                }
                
                [MonoTODO]
--              public virtual string Name {
++              public override bool EnablePasswordRetrieval {
                        get { throw new NotImplementedException (); }
                }
                
                }
                
                [MonoTODO]
--              public virtual bool RequiresQuestionAndAnswer {
++              public override bool RequiresQuestionAndAnswer {
                        get { throw new NotImplementedException (); }
                }
                
index f53ba0bb2b3c1572d726cc4a43122ec7ca579d99,f53ba0bb2b3c1572d726cc4a43122ec7ca579d99..370056ebb9b037352378708d670fad8561665270
@@@ -34,81 -34,81 +34,82 @@@ using System.Collections.Specialized
  using System.Text;
  
  namespace System.Web.Security {
--      public class SqlRoleProvider {
++      public class SqlRoleProvider: RoleProvider {
                
                [MonoTODO]
--              public void AddUsersToRoles (string [] usernames, string [] rolenames)
++              public override void AddUsersToRoles (string [] usernames, string [] rolenames)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public void CreateRole (string rolename)
++              public override void CreateRole (string rolename)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public void DeleteRole (string rolename)
++              public override void DeleteRole (string rolename, bool throwOnPopulatedRole)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public string [] GetAllRoles ()
++              public override void FindUsersInRole (string roleName, string usernameToMatch)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public string [] GetRolesForUser (string username)
++              public override string [] GetAllRoles ()
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public string [] GetUsersInRole (string rolename)
++              public override string [] GetRolesForUser (string username)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public virtual void Initialize (string name, NameValueCollection config)
++              public override string [] GetUsersInRole (string rolename)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public bool IsUserInRole (string username, string rolename)
++              public override void Initialize (string name, NameValueCollection config)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public void RemoveUsersFromRoles (string [] usernames, string [] rolenames)
++              public override bool IsUserInRole (string username, string rolename)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public bool RoleExists (string rolename)
++              public override void RemoveUsersFromRoles (string [] usernames, string [] rolenames)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public string ApplicationName {
--                      get { throw new NotImplementedException (); }
--                      set { throw new NotImplementedException (); }
++              public override bool RoleExists (string rolename)
++              {
++                      throw new NotImplementedException ();
                }
                
                [MonoTODO]
--              public virtual string Description {
++              public override string ApplicationName {
                        get { throw new NotImplementedException (); }
++                      set { throw new NotImplementedException (); }
                }
                
                [MonoTODO]
--              public virtual string Name {
++              public virtual string Description {
                        get { throw new NotImplementedException (); }
                }
        }