-03-23-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>\r
- * WPAuthenticationModule.cs: fixed in WPPrincipal class method -\r
- IsInRole - we are leaving this for RoleBasedPrincipal class to handle\r
- this method.\r
-\r
-03-12-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>\r
-\r
- * WPAuthenticationModule.cs: added to project. Portal specific\r
- authentication module (uses PUMA services)\r
- * IPumaServicesProvider.cs, PumaServicesProvider.cs,\r
- WPGroupsRoleProvider.cs: added 'CurrentUserName' property and \r
- internal helpers methods.\r
-\r
-03-01-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>\r
-\r
- * PumaServicesProvider.cs: fixed PumaController property (proper\r
- handling process action phace)\r
-\r
-02-26-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>\r
- \r
- * WPGroupsRoleProvider.cs: fixed RoleExists method - in case when\r
- wildcard used in roleName parameter.\r
-\r
-02-26-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>\r
-\r
- * Added comments, NET_2_0 derective to all classes under this\r
- directory.\r
-\r
-02-26-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>\r
-\r
- * WPS*.cs : renamed to WP*.cs files and respective classes.\r
- * WPGroupsRoleProvider.cs: small fixes in implemented read-only\r
- features\r
- * PumaServicesProvider.cs: changed implementation of obtaining\r
- configuration properties - use JNDI repository and cache it in\r
- portlet/servlet session.\r
-\r
-03-12-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>\r
-\r
- * PumaServicesProvider.cs: fixed TD BUG: 7489 (the application\r
- should not throw an exeption even if no WPGroupsRoleNamespace is not\r
- defined in web.xml)\r
-\r
-02-25-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>\r
-\r
- * WPSGroupsRoleProvider.cs: added\r
- * WPSMembershipProvider.cs, WPSMembershipUser.cs: added NET_2_0\r
- directives.\r
-\r
-02-21-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>\r
-\r
- * WPSMembershipProvider.cs: fixed 'null' case in GetUser methods - \r
- should return 'current user'\r
-\r
-02-20-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>\r
-\r
- * WPSMembershipProvider.cs : fixed paging of resources.\r
-\r
-02-19-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>\r
-\r
- * IPumaServicesProvider.cs, PumaServicesProvider.cs,\r
- PumaServicesProviderFactory.cs, WPSMembershipProvider.cs,\r
- WPSMembershipUser.cs : Added to the project - implementation of\r
- Web Sphere Portal MembershipProvider and Web Sphere Portal \r
- MembershipUser - based on PUMA API.\r
-\r
+03-23-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>
+
+ * WPMembershipProvider.cs: bug fixes
+
+03-23-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>
+ * WPAuthenticationModule.cs: fixed in WPPrincipal class method -
+ IsInRole - we are leaving this for RoleBasedPrincipal class to handle
+ this method.
+
+03-12-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>
+
+ * WPAuthenticationModule.cs: added to project. Portal specific
+ authentication module (uses PUMA services)
+ * IPumaServicesProvider.cs, PumaServicesProvider.cs,
+ WPGroupsRoleProvider.cs: added 'CurrentUserName' property and
+ internal helpers methods.
+
+03-01-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>
+
+ * PumaServicesProvider.cs: fixed PumaController property (proper
+ handling process action phace)
+
+02-26-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>
+
+ * WPGroupsRoleProvider.cs: fixed RoleExists method - in case when
+ wildcard used in roleName parameter.
+
+02-26-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>
+
+ * Added comments, NET_2_0 derective to all classes under this
+ directory.
+
+02-26-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>
+
+ * WPS*.cs : renamed to WP*.cs files and respective classes.
+ * WPGroupsRoleProvider.cs: small fixes in implemented read-only
+ features
+ * PumaServicesProvider.cs: changed implementation of obtaining
+ configuration properties - use JNDI repository and cache it in
+ portlet/servlet session.
+
+03-12-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>
+
+ * PumaServicesProvider.cs: fixed TD BUG: 7489 (the application
+ should not throw an exeption even if no WPGroupsRoleNamespace is not
+ defined in web.xml)
+
+02-25-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>
+
+ * WPSGroupsRoleProvider.cs: added
+ * WPSMembershipProvider.cs, WPSMembershipUser.cs: added NET_2_0
+ directives.
+
+02-21-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>
+
+ * WPSMembershipProvider.cs: fixed 'null' case in GetUser methods -
+ should return 'current user'
+
+02-20-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>
+
+ * WPSMembershipProvider.cs : fixed paging of resources.
+
+02-19-2007 Ilya Kharmatsky <ilyak -at- mainsoft.com>
+
+ * IPumaServicesProvider.cs, PumaServicesProvider.cs,
+ PumaServicesProviderFactory.cs, WPSMembershipProvider.cs,
+ WPSMembershipUser.cs : Added to the project - implementation of
+ Web Sphere Portal MembershipProvider and Web Sphere Portal
+ MembershipUser - based on PUMA API.
+
#region Implemented Methods\r
public override MembershipUserCollection FindUsersByEmail(string emailToMatch, int pageIndex, int pageSize, out int totalRecords)\r
{\r
- if (emailToMatch == null || emailToMatch.Length > 256) // TODO check if the string could be null, if yes replace it with "*" for any email\r
- throw new ArgumentException("Argument emailToMatch either null or length > 256", "emailToMatch");\r
+ if (emailToMatch == null)\r
+ {\r
+ totalRecords = 0;\r
+ return new MembershipUserCollection();\r
+ }\r
+\r
+ if (emailToMatch.Length > 256) \r
+ throw new ArgumentException("Argument emailToMatch has length > 256", "emailToMatch");\r
if (pageIndex < 0)\r
throw new ArgumentException("Argument pageIndex could not be negative", "pageIndex");\r
if (pageSize < 1)\r
\r
public override MembershipUserCollection FindUsersByName(string usernameToMatch, int pageIndex, int pageSize, out int totalRecords)\r
{\r
- if (usernameToMatch == null || usernameToMatch.Trim().Length == 0 || usernameToMatch.Trim().Length > 256)\r
- throw new ArgumentException("Wrong username given as a parameter - could not be null or empty string and could not have more than 255 characters", usernameToMatch);\r
+ if (usernameToMatch == null)\r
+ throw new ArgumentNullException("username");\r
+ if (usernameToMatch.Trim().Length == 0 || usernameToMatch.Trim().Length > 256)\r
+ throw new ArgumentException("Wrong username given as a parameter - could not have more than 255 characters", usernameToMatch);\r
if (pageIndex < 0)\r
throw new ArgumentException("Argument pageIndex could not be negative", "pageIndex");\r
if (pageSize < 1)\r
//the userIsOnline ignored\r
public override MembershipUser GetUser(string username, bool userIsOnline)\r
{\r
+ if (username == null)\r
+ throw new ArgumentNullException("username");\r
if (username.Length > 256)\r
throw new ArgumentException("The username is too long", username);\r
- IPumaServicesProvider provider = PumaServicesProviderFactory.CreateProvider();\r
- \r
- if (username == null || username == String.Empty)\r
- return new WPMembershipUser(provider.CurrentUser);\r
+ if (username.IndexOf(',') != -1)\r
+ throw new ArgumentException("Comma symbol is not allowed in username");\r
\r
+ IPumaServicesProvider provider = PumaServicesProviderFactory.CreateProvider();\r
java.util.List principles = provider.PumaLocator.findUsersByAttribute("uid", username);\r
MembershipUser result = null;\r
if (principles.size() > 0)\r