Split rest authentication into two. For web apps integration url is /c/restful/
This commit is contained in:
@@ -116,7 +116,7 @@
|
||||
$('#changePasswordMsg').removeClass('alert-info').addClass('alert-error').show();
|
||||
$('#changePasswordMsg').text('<spring:message code="PASSWORD_MISSMATCH"/>');
|
||||
} else {
|
||||
postChange("service/account/password", inputVal, 'changePasswordMsg', '<spring:message code="CHANGE_PASSWORD_SUCCESS"/>');
|
||||
postChange("c/restful/account/password", inputVal, 'changePasswordMsg', '<spring:message code="CHANGE_PASSWORD_SUCCESS"/>');
|
||||
}
|
||||
event.preventDefault();
|
||||
});
|
||||
@@ -125,15 +125,15 @@
|
||||
|
||||
var fistname = $('#changeUserForm #firstname').val();
|
||||
var lastname = $('#changeUserForm #lastname').val();
|
||||
postChange("service/account/firstname", fistname, 'changeInfoMsg', '<spring:message code="INFO_UPDATE_SUCCESS"/>');
|
||||
postChange("service/account/lastname", lastname, 'changeInfoMsg', '<spring:message code="INFO_UPDATE_SUCCESS"/>');
|
||||
postChange("c/restful/account/firstname", fistname, 'changeInfoMsg', '<spring:message code="INFO_UPDATE_SUCCESS"/>');
|
||||
postChange("c/restful/account/lastname", lastname, 'changeInfoMsg', '<spring:message code="INFO_UPDATE_SUCCESS"/>');
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
$('#languageForm').submit(function (event) {
|
||||
|
||||
var locale = $('#languageForm option:selected').val();
|
||||
postChange("service/account/locale", locale, 'languageMsg', '<spring:message code="INFO_UPDATE_SUCCESS"/>');
|
||||
postChange("c/restful/account/locale", locale, 'languageMsg', '<spring:message code="INFO_UPDATE_SUCCESS"/>');
|
||||
event.preventDefault();
|
||||
});
|
||||
</script>
|
||||
|
@@ -40,7 +40,7 @@
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<form method="GET" class="form-horizontal" action="service/maps/${mindmap.id}"
|
||||
<form method="GET" class="form-horizontal" action="c/restful/maps/${mindmap.id}"
|
||||
enctype="application/x-www-form-urlencoded" id="iframeExportForm">
|
||||
<input name="svgXml" id="svgXml" value="" type="hidden"/>
|
||||
<input name="download" id="download" type="hidden" value="mm"/>
|
||||
|
@@ -9,6 +9,7 @@
|
||||
<%--@elvariable id="editorTryMode" type="java.lang.Boolean"--%>
|
||||
<%--@elvariable id="editorTryMode" type="java.lang.String"--%>
|
||||
<%--@elvariable id="mapXml" type="com.wisemapping.model.User"--%>
|
||||
<%--@elvariable id="lockInfo" type="com.wisemapping.service.LockInfo"--%>
|
||||
<html>
|
||||
<head>
|
||||
<base href="${requestScope['site.baseurl']}/">
|
||||
@@ -37,13 +38,14 @@
|
||||
<c:if test="${!memoryPersistence && !readOnlyMode}">
|
||||
options.persistenceManager = new mindplot.RESTPersistenceManager(
|
||||
{
|
||||
saveUrl:"service/maps/{id}/document",
|
||||
revertUrl:"service/maps/{id}/history/latest",
|
||||
lockUrl:"service/maps/{id}/lock",
|
||||
saveUrl:"c/restful/maps/{id}/document",
|
||||
revertUrl:"c/restful/maps/{id}/history/latest",
|
||||
lockUrl:"c/restful/maps/{id}/lock",
|
||||
timestamp: ${lockTimestamp},
|
||||
session: ${lockSession}
|
||||
}
|
||||
);
|
||||
|
||||
</c:if>
|
||||
var userOptions = ${mindmap.properties};
|
||||
options.zoom = userOptions.zoom;
|
||||
@@ -68,7 +70,7 @@
|
||||
}
|
||||
|
||||
<c:if test="${mindmapLocked}">
|
||||
$notify("<spring:message code="MINDMAP_LOCKED" arguments="${lockInfo.collaborator.email}"/>", false);
|
||||
$notify("<spring:message code="MINDMAP_LOCKED" arguments="${lockInfo.user.fullName},${lockInfo.user.email}"/>", false);
|
||||
</c:if>
|
||||
});
|
||||
|
||||
|
@@ -6,7 +6,7 @@
|
||||
</p>
|
||||
|
||||
<div>
|
||||
<form method="GET" class="form-horizontal" action="service/maps/${mindmap.id}"
|
||||
<form method="GET" class="form-horizontal" action="c/restful/maps/${mindmap.id}"
|
||||
enctype="application/x-www-form-urlencoded" id="dialogMainForm">
|
||||
<input name="svgXml" id="svgXml" value="" type="hidden"/>
|
||||
<input name="download" type="hidden" value="mm"/>
|
||||
@@ -75,7 +75,7 @@
|
||||
var form = $('#dialogMainForm');
|
||||
|
||||
// Restore default ..
|
||||
form.attr('action', 'service/maps/${mindmap.id}.' + formatType);
|
||||
form.attr('action', 'c/restful/maps/${mindmap.id}.' + formatType);
|
||||
|
||||
if (formatType == 'image' || formatType == 'svg' || formatType == 'pdf') {
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
}
|
||||
// Change to transform url ...
|
||||
form.attr('method', "POST");
|
||||
form.attr('action', 'service/transform.' + formatType);
|
||||
form.attr('action', 'c/restful/transform.' + formatType);
|
||||
|
||||
// Load page SVG ...
|
||||
var svgXml = window.parent.document.getElementById('workspaceContainer').innerHTML;
|
||||
|
@@ -26,7 +26,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
var tableElem = $('#historyTable');
|
||||
jQuery.ajax("service/maps/${mindmapId}/history", {
|
||||
jQuery.ajax("c/restful/maps/${mindmapId}/history", {
|
||||
async:false,
|
||||
dataType:'json',
|
||||
type:'GET',
|
||||
@@ -54,7 +54,7 @@
|
||||
});
|
||||
tableElem.find('tr a.revert').each(function () {
|
||||
$(this).click(function (event) {
|
||||
var url = "service/maps/${mindmapId}/history/" + $(this).closest("tr").attr("data-history-id");
|
||||
var url = "c/restful/maps/${mindmapId}/history/" + $(this).closest("tr").attr("data-history-id");
|
||||
jQuery.post(url, function (data) {
|
||||
window.parent.location = "c/maps/${mindmapId}/edit";
|
||||
});
|
||||
|
@@ -48,7 +48,7 @@
|
||||
description = description == undefined ? "" : description;
|
||||
|
||||
// Save status on click ...
|
||||
jQuery.ajax("service/maps?title=" + encodeURI(title) + "&description=" + encodeURI(description),
|
||||
jQuery.ajax("c/restful/maps?title=" + encodeURI(title) + "&description=" + encodeURI(description),
|
||||
{
|
||||
async:false,
|
||||
data:fileContent,
|
||||
|
@@ -33,7 +33,7 @@
|
||||
$(function () {
|
||||
$('#mindmapListTable').dataTable({
|
||||
bProcessing:true,
|
||||
sAjaxSource:"service/maps/",
|
||||
sAjaxSource:"c/restful/maps/",
|
||||
sAjaxDataProp:'mindmapsInfo',
|
||||
fnInitComplete:function () {
|
||||
$('#mindmapListTable tbody').change(updateStatusToolbar);
|
||||
|
@@ -105,7 +105,7 @@ solid black" src="${baseUrl}/c/maps/${mindmap.id}/embed?zoom=1"> </iframe&
|
||||
|
||||
// Save status on click ...
|
||||
$('#dialogMainForm').submit(function (event) {
|
||||
jQuery.ajax("service/maps/${mindmap.id}/publish", {
|
||||
jQuery.ajax("c/restful/maps/${mindmap.id}/publish", {
|
||||
async:false,
|
||||
dataType:'json',
|
||||
data:$('#dialogMainForm #enablePublicView')[0].checked ? 'true' : 'false',
|
||||
|
@@ -164,7 +164,7 @@ var removeCollab = function (email) {
|
||||
};
|
||||
|
||||
$(function () {
|
||||
jQuery.ajax("service/maps/${mindmap.id}/collabs", {
|
||||
jQuery.ajax("c/restful/maps/${mindmap.id}/collabs", {
|
||||
async:false,
|
||||
dataType:'json',
|
||||
type:'GET',
|
||||
@@ -284,7 +284,7 @@ var submitDialogForm = function () {
|
||||
});
|
||||
collabs['message'] = $("#collabMessage").val();
|
||||
|
||||
jQuery.ajax("service/maps/${mindmap.id}/collabs", {
|
||||
jQuery.ajax("c/restful/maps/${mindmap.id}/collabs", {
|
||||
async:false,
|
||||
dataType:'json',
|
||||
type:'PUT',
|
||||
|
Reference in New Issue
Block a user