Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Modified: wflow-directory, wflow-consoleweb - Support for dot (.) in …

…username #682.

git-svn-id: http://dev.joget.org/svn/jw-community/trunk@388 1bff935d-2fe2-40b7-b00f-c2aca69a7612
  • Loading branch information...
commit 8fd1af7c61dffd007b680fe37476e893bf64cdc9 1 parent 69bb174
julian authored
2  wflow-consoleweb/src/main/java/org/joget/apps/app/controller/ConsoleWebController.java
View
@@ -968,7 +968,7 @@ public String consoleUserSubmit(ModelMap model, @RequestParam("action") String a
String contextPath = WorkflowUtil.getHttpServletRequest().getContextPath();
String url = contextPath;
- url += "/web/console/directory/user/view/" + user.getId();
+ url += "/web/console/directory/user/view/" + user.getId() + ".";
model.addAttribute("url", url);
return "console/dialogClose";
}
2  wflow-consoleweb/src/main/webapp/WEB-INF/jsp/console/apps/processView.jsp
View
@@ -123,7 +123,7 @@
${participantDisplayName}
</c:when>
<c:otherwise>
- <a href="${pageContext.request.contextPath}/web/console/directory/${participantMap[participantUid].type}/view/${participantValue}">${participantDisplayName}</a>
+ <a href="${pageContext.request.contextPath}/web/console/directory/${participantMap[participantUid].type}/view/${participantValue}.">${participantDisplayName}</a>
</c:otherwise>
</c:choose>
</span>
1  wflow-consoleweb/src/main/webapp/WEB-INF/jsp/console/directory/deptHodSetView.jsp
View
@@ -29,6 +29,7 @@
desc="false"
href="${pageContext.request.contextPath}/web/console/directory/user/view"
hrefParam="user.id"
+ hrefSuffix="."
hrefQuery="false"
hrefDialog="false"
hrefDialogWidth="600px"
3  wflow-consoleweb/src/main/webapp/WEB-INF/jsp/console/directory/deptView.jsp
View
@@ -56,7 +56,7 @@
<label for="field1"><fmt:message key="console.directory.department.common.label.hod"/></label>
<span class="form-input">
<c:if test="${!empty hod}">
- <a href="${pageContext.request.contextPath}/web/console/directory/user/view/${hod.id}">${hod.username}</a>
+ <a href="${pageContext.request.contextPath}/web/console/directory/user/view/${hod.id}.">${hod.username}</a>
</c:if>
</span>
</div>
@@ -114,6 +114,7 @@
desc="false"
href="${pageContext.request.contextPath}/web/console/directory/user/view"
hrefParam="user.id"
+ hrefSuffix="."
hrefQuery="false"
hrefDialog="false"
hrefDialogWidth="600px"
1  wflow-consoleweb/src/main/webapp/WEB-INF/jsp/console/directory/gradeView.jsp
View
@@ -66,6 +66,7 @@
desc="false"
href="${pageContext.request.contextPath}/web/console/directory/user/view"
hrefParam="user.id"
+ hrefSuffix="."
hrefQuery="false"
hrefDialog="false"
hrefDialogWidth="600px"
1  wflow-consoleweb/src/main/webapp/WEB-INF/jsp/console/directory/groupView.jsp
View
@@ -52,6 +52,7 @@
desc="false"
href="${pageContext.request.contextPath}/web/console/directory/user/view"
hrefParam="id"
+ hrefSuffix="."
hrefQuery="false"
hrefDialog="false"
hrefDialogWidth="600px"
1  wflow-consoleweb/src/main/webapp/WEB-INF/jsp/console/directory/orgView.jsp
View
@@ -132,6 +132,7 @@
desc="false"
href="${pageContext.request.contextPath}/web/console/directory/user/view"
hrefParam="user.id"
+ hrefSuffix="."
hrefQuery="false"
hrefDialog="false"
hrefDialogWidth="600px"
2  wflow-consoleweb/src/main/webapp/WEB-INF/jsp/console/directory/userCreate.jsp
View
@@ -149,7 +149,7 @@
function validateField(){
var valid = true;
var alertString = "";
- var idMatch = /^[0-9a-zA-Z_-]+$/.test($("#username").attr("value"));
+ var idMatch = /^[\.0-9a-zA-Z_-]+$/.test($("#username").attr("value"));
if(!idMatch){
if(!idMatch){
alertString += '<fmt:message key="console.directory.user.error.label.usernameInvalid"/>';
1  wflow-consoleweb/src/main/webapp/WEB-INF/jsp/console/directory/userList.jsp
View
@@ -42,6 +42,7 @@
desc="false"
href="${pageContext.request.contextPath}/web/console/directory/user/view"
hrefParam="id"
+ hrefSuffix="."
hrefQuery="false"
hrefDialog="false"
hrefDialogWidth="600px"
8 wflow-consoleweb/src/main/webapp/WEB-INF/jsp/console/directory/userView.jsp
View
@@ -125,7 +125,7 @@
<label for="field1"><fmt:message key="console.directory.employment.common.label.reportTo"/></label>
<span class="form-input">
<c:if test="${!empty employment.employmentReportTo && !empty employment.employmentReportTo.reportTo && !empty employment.employmentReportTo.reportTo.user}">
- <a href="${pageContext.request.contextPath}/web/console/directory/user/view/${employment.employmentReportTo.reportTo.user.id}">${employment.employmentReportTo.reportTo.user.firstName} ${employment.employmentReportTo.reportTo.user.lastName}</a>
+ <a href="${pageContext.request.contextPath}/web/console/directory/user/view/${employment.employmentReportTo.reportTo.user.id}.">${employment.employmentReportTo.reportTo.user.firstName} ${employment.employmentReportTo.reportTo.user.lastName}</a>
</c:if>
</span>
</div>
@@ -184,7 +184,7 @@
</c:if>
});
- <ui:popupdialog var="popupDialog" src="${pageContext.request.contextPath}/web/console/directory/user/edit/${user.id}"/>
+ <ui:popupdialog var="popupDialog" src="${pageContext.request.contextPath}/web/console/directory/user/edit/${user.id}."/>
<ui:popupdialog var="popupDialog2" src="${pageContext.request.contextPath}/web/console/directory/user/${user.id}/group/assign/view"/>
<ui:popupdialog var="popupDialog3" src="${pageContext.request.contextPath}/web/console/directory/user/${user.id}/reportTo/assign/view"/>
@@ -221,7 +221,7 @@
if (confirm('<fmt:message key="console.directory.user.reportTo.unassign.label.confirmation"/>')) {
var callback = {
success : function() {
- document.location = '${pageContext.request.contextPath}/web/console/directory/user/view/${user.id}';
+ document.location = '${pageContext.request.contextPath}/web/console/directory/user/view/${user.id}.';
}
}
var request = ConnectionManager.post('${pageContext.request.contextPath}/web/console/directory/user/${user.id}/reportTo/unassign', callback, '');
@@ -232,7 +232,7 @@
if (confirm('<fmt:message key="console.directory.user.group.unassign.label.confirmation"/>')) {
var callback = {
success : function() {
- document.location = '${pageContext.request.contextPath}/web/console/directory/user/view/${user.id}';
+ document.location = '${pageContext.request.contextPath}/web/console/directory/user/view/${user.id}.';
}
}
var request = ConnectionManager.post('${pageContext.request.contextPath}/web/console/directory/user/${user.id}/group/unassign', callback, 'ids='+ selectedIds);
1  wflow-consoleweb/src/main/webapp/WEB-INF/jsp/console/monitor/activityReassign.jsp
View
@@ -27,6 +27,7 @@
desc="false"
href=""
hrefParam="username"
+ hrefSuffix="."
hrefQuery="false"
hrefDialog="false"
hrefDialogWidth="600px"
4 wflow-consoleweb/src/main/webapp/WEB-INF/tags/ui/jsontable.tag
View
@@ -12,6 +12,7 @@
<%@ attribute name="href" %>
<%@ attribute name="hrefParam" %>
<%@ attribute name="hrefQuery" %>
+<%@ attribute name="hrefSuffix" %>
<%@ attribute name="hrefDialog" %>
<%@ attribute name="hrefDialogWidth" %>
<%@ attribute name="hrefDialogHeight" %>
@@ -250,6 +251,9 @@
</c:if>
<c:if test="${!empty href}">
${var}.link = new Link("${href}", "${hrefParam}", ${hrefQuery}, ${var}_popupDialog);
+ <c:if test="${!empty hrefSuffix}">
+ ${var}.link.suffix = "${hrefSuffix}";
+ </c:if>
</c:if>
<c:if test="${empty hrefDialogWidth}">${var}_popupDialog.width="${hrefDialogWidth}";</c:if>
<c:if test="${empty hrefDialogHeight}">${var}_popupDialog.height="${hrefDialogHeight}";</c:if>
4 wflow-consoleweb/src/main/webapp/js/json/ui.js
View
@@ -157,6 +157,7 @@ Link.prototype = {
href: null,
param: null,
value: null,
+ suffix: null,
queryString: false,
popupDialog: null,
@@ -169,6 +170,9 @@ Link.prototype = {
link += "/";
}
link += escape(this.value);
+ if (this.suffix) {
+ link += this.suffix;
+ }
}
else {
var hasQueryString = link.indexOf("?") >= 0;
2  wflow-directory/src/main/java/org/joget/directory/model/User.java
View
@@ -14,7 +14,7 @@
public static final int INACTIVE = 0;
private String id;
@NotBlank
- @RegExp(value = "^[0-9a-zA-Z_-]+$")
+ @RegExp(value = "^[.0-9a-zA-Z_-]+$")
private String username;
private String password;
@NotBlank
Please sign in to comment.
Something went wrong with that request. Please try again.