mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Web Scripts:
- fix issues integrating with Flex (rename of tunnel url arguments) - add admin to required authentication levels - support json callback method (for browser based ajax requests) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5856 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -27,6 +27,7 @@ package org.alfresco.web.scripts;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.alfresco.service.cmr.security.AuthorityService;
|
||||
import org.alfresco.service.transaction.TransactionService;
|
||||
import org.alfresco.web.config.ServerConfigElement;
|
||||
import org.alfresco.web.scripts.WebScriptDescription.RequiredAuthentication;
|
||||
@@ -54,10 +55,11 @@ public class WebScriptServletRuntime extends WebScriptRuntime
|
||||
* @param req
|
||||
* @param res
|
||||
*/
|
||||
public WebScriptServletRuntime(WebScriptRegistry registry, TransactionService transactionService, WebScriptServletAuthenticator authenticator,
|
||||
public WebScriptServletRuntime(WebScriptRegistry registry, TransactionService transactionService,
|
||||
AuthorityService authorityService, WebScriptServletAuthenticator authenticator,
|
||||
HttpServletRequest req, HttpServletResponse res, ServerConfigElement serverConfig)
|
||||
{
|
||||
super(registry, transactionService);
|
||||
super(registry, transactionService, authorityService);
|
||||
this.req = req;
|
||||
this.res = res;
|
||||
this.authenticator = authenticator;
|
||||
@@ -78,13 +80,13 @@ public class WebScriptServletRuntime extends WebScriptRuntime
|
||||
String overload = req.getHeader("X-HTTP-Method-Override");
|
||||
if (overload == null || overload.length() == 0)
|
||||
{
|
||||
overload = req.getParameter("alf:method");
|
||||
overload = req.getParameter("alf_method");
|
||||
overloadParam = true;
|
||||
}
|
||||
if (overload != null && overload.length() > 0)
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("POST is tunnelling method '" + overload + "' as specified by " + (overloadParam ? "alf:method parameter" : "X-HTTP-Method-Override header"));
|
||||
logger.debug("POST is tunnelling method '" + overload + "' as specified by " + (overloadParam ? "alf_method parameter" : "X-HTTP-Method-Override header"));
|
||||
|
||||
method = overload;
|
||||
}
|
||||
|
Reference in New Issue
Block a user