[Carbon-dev] svn commit r30680 - in trunk/carbon-components/user-mgt/org.wso2.carbon.user.mgt.ui/src/main/resources: org/wso2/carbon/userstore/ui/i18n web/user web/userstore web/userstore/extensions/js
dimuthul at wso2.com
dimuthul at wso2.com
Wed Feb 11 21:25:34 PST 2009
Author: dimuthul
Date: Wed Feb 11 21:25:33 2009
New Revision: 30680
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=30680
Log:
Fixing 2769
Modified:
trunk/carbon-components/user-mgt/org.wso2.carbon.user.mgt.ui/src/main/resources/org/wso2/carbon/userstore/ui/i18n/Resources.properties
trunk/carbon-components/user-mgt/org.wso2.carbon.user.mgt.ui/src/main/resources/web/user/add-step1.jsp
trunk/carbon-components/user-mgt/org.wso2.carbon.user.mgt.ui/src/main/resources/web/user/user-mgt.jsp
trunk/carbon-components/user-mgt/org.wso2.carbon.user.mgt.ui/src/main/resources/web/userstore/ex-user-mgt.jsp
trunk/carbon-components/user-mgt/org.wso2.carbon.user.mgt.ui/src/main/resources/web/userstore/extensions/js/vui.js
Modified: trunk/carbon-components/user-mgt/org.wso2.carbon.user.mgt.ui/src/main/resources/org/wso2/carbon/userstore/ui/i18n/Resources.properties
URL: http://wso2.org/svn/browse/wso2/trunk/carbon-components/user-mgt/org.wso2.carbon.user.mgt.ui/src/main/resources/org/wso2/carbon/userstore/ui/i18n/Resources.properties?rev=30680&r1=30679&r2=30680&view=diff
==============================================================================
--- trunk/carbon-components/user-mgt/org.wso2.carbon.user.mgt.ui/src/main/resources/org/wso2/carbon/userstore/ui/i18n/Resources.properties (original)
+++ trunk/carbon-components/user-mgt/org.wso2.carbon.user.mgt.ui/src/main/resources/org/wso2/carbon/userstore/ui/i18n/Resources.properties Wed Feb 11 21:25:33 2009
@@ -1,3 +1,4 @@
+no.users.filtered=No users captured by the filter
unselect.all=Unselect All
update.name=Update Name
new.rolename=New Role Name
@@ -164,4 +165,5 @@
manage-mediation=Manage mediation
monitor-system=Monitor system
store.password.error=Invalid character in store password.
-store.password.retype.error=Please type the same password twice.
\ No newline at end of file
+store.password.retype.error=Please type the same password twice.
+special.first.characters.not.allowed=Special characters are not allowed as the first character.
\ No newline at end of file
Modified: trunk/carbon-components/user-mgt/org.wso2.carbon.user.mgt.ui/src/main/resources/web/user/add-step1.jsp
URL: http://wso2.org/svn/browse/wso2/trunk/carbon-components/user-mgt/org.wso2.carbon.user.mgt.ui/src/main/resources/web/user/add-step1.jsp?rev=30680&r1=30679&r2=30680&view=diff
==============================================================================
--- trunk/carbon-components/user-mgt/org.wso2.carbon.user.mgt.ui/src/main/resources/web/user/add-step1.jsp (original)
+++ trunk/carbon-components/user-mgt/org.wso2.carbon.user.mgt.ui/src/main/resources/web/user/add-step1.jsp Wed Feb 11 21:25:33 2009
@@ -34,6 +34,12 @@
return false;
}
+ reason = validateFirstCharactorOfName("username");
+ if (reason != "") {
+ CARBON.showWarningDialog("<fmt:message key="special.first.characters.not.allowed"/>");
+ return false;
+ }
+
reason = validatePassword("password", "retype");
if (reason != "") {
CARBON.showWarningDialog(reason);
Modified: trunk/carbon-components/user-mgt/org.wso2.carbon.user.mgt.ui/src/main/resources/web/user/user-mgt.jsp
URL: http://wso2.org/svn/browse/wso2/trunk/carbon-components/user-mgt/org.wso2.carbon.user.mgt.ui/src/main/resources/web/user/user-mgt.jsp?rev=30680&r1=30679&r2=30680&view=diff
==============================================================================
--- trunk/carbon-components/user-mgt/org.wso2.carbon.user.mgt.ui/src/main/resources/web/user/user-mgt.jsp (original)
+++ trunk/carbon-components/user-mgt/org.wso2.carbon.user.mgt.ui/src/main/resources/web/user/user-mgt.jsp Wed Feb 11 21:25:33 2009
@@ -15,12 +15,8 @@
<title>WSO2 Carbon - Security Configuration</title>
<%
- String haveToDelete = "false";
- Object o = session.getAttribute("user-added");
- if (o != null && o.equals("true")) {
- haveToDelete = "true";
- session.removeAttribute("user-added");
- }
+ boolean showFilterMessage = false;
+
session.removeAttribute("userBean");
String[] datas = null;
String filter = (String)request.getParameter("org.wso2.usermgt.internal.filter");
@@ -44,6 +40,9 @@
if(filter.length() > 0){
datas = client.listInternalUsers(filter);
+ if(datas == null || datas.length == 0){
+ showFilterMessage = true;
+ }
}
} catch (Exception e) {
@@ -71,6 +70,9 @@
CARBON.showConfirmationDialog('<fmt:message key="confirm.delete.user"/> ' + '?', doDelete, null);
}
+ <% if(showFilterMessage == true){ %>
+ CARBON.showInfoDialog('<fmt:message key="no.users.filtered"/>', null, null);
+ <% } %>
</script>
<div id="middle">
Modified: trunk/carbon-components/user-mgt/org.wso2.carbon.user.mgt.ui/src/main/resources/web/userstore/ex-user-mgt.jsp
URL: http://wso2.org/svn/browse/wso2/trunk/carbon-components/user-mgt/org.wso2.carbon.user.mgt.ui/src/main/resources/web/userstore/ex-user-mgt.jsp?rev=30680&r1=30679&r2=30680&view=diff
==============================================================================
--- trunk/carbon-components/user-mgt/org.wso2.carbon.user.mgt.ui/src/main/resources/web/userstore/ex-user-mgt.jsp (original)
+++ trunk/carbon-components/user-mgt/org.wso2.carbon.user.mgt.ui/src/main/resources/web/userstore/ex-user-mgt.jsp Wed Feb 11 21:25:33 2009
@@ -16,6 +16,7 @@
<%@ page import="org.wso2.carbon.ui.CarbonUIMessage" %>
<%
+ boolean showFilterMessage = false;
String[] datas = null;
String filter = (String)request.getParameter("org.wso2.usermgt.external.filter");
if(filter == null){
@@ -38,6 +39,9 @@
UserMgtClient client = new UserMgtClient(cookie, backendServerURL, configContext);
if(filter.length() > 0){
datas = client.listExternalUsers(filter);
+ if(datas == null || datas.length == 0){
+ showFilterMessage = true;
+ }
}
} catch (Exception e) {
CarbonUIMessage uiMsg = new CarbonUIMessage(CarbonUIMessage.ERROR, e.getMessage(), e);
Modified: trunk/carbon-components/user-mgt/org.wso2.carbon.user.mgt.ui/src/main/resources/web/userstore/extensions/js/vui.js
URL: http://wso2.org/svn/browse/wso2/trunk/carbon-components/user-mgt/org.wso2.carbon.user.mgt.ui/src/main/resources/web/userstore/extensions/js/vui.js?rev=30680&r1=30679&r2=30680&view=diff
==============================================================================
--- trunk/carbon-components/user-mgt/org.wso2.carbon.user.mgt.ui/src/main/resources/web/userstore/extensions/js/vui.js (original)
+++ trunk/carbon-components/user-mgt/org.wso2.carbon.user.mgt.ui/src/main/resources/web/userstore/extensions/js/vui.js Wed Feb 11 21:25:33 2009
@@ -47,6 +47,26 @@
return error;
}
+function validateFirstCharactorOfName(fldname) {
+ var invalid = " "; // Invalid character is a space
+ var fld = document.getElementsByName(fldname)[0];
+ var error = "";
+ var value = fld.value;
+ debugger;
+ if (value.indexOf("[") == 0 || value.indexOf("]") == 0 || value.indexOf("(") == 0 ||
+ value.indexOf(")") == 0 || value.indexOf("^") == 0 || value.indexOf("*") == 0 ||
+ value.indexOf("%") == 0 || value.indexOf("$") == 0 || value.indexOf("#") == 0 ||
+ value.indexOf("@") == 0 || value.indexOf("!") == 0 || value.indexOf("~") == 0 ||
+ value.indexOf("{") == 0 || value.indexOf("}") == 0 || value.indexOf("?") == 0 ||
+ value.indexOf("'") == 0 || value.indexOf("`") == 0 || value.indexOf(",") == 0 ||
+ value.indexOf("|") == 0 || value.indexOf("\\") == 0 || value.indexOf("\"") == 0 ||
+ value.indexOf("?") == 0 || value.indexOf("/") ==0 || value.indexOf(";") == 0 ||
+ value.indexOf(":") == 0) {
+ error = fld.name;
+ }
+ return error;
+}
+
function isAtleastOneCheckedIfExisting(fldname){
var foundOne = false;
var elems = document.getElementsByName(fldname);
More information about the Carbon-dev
mailing list