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:
David Caruana
2007-06-05 18:17:59 +00:00
parent d28bbd41c5
commit 61b6952524
12 changed files with 95 additions and 21 deletions

View File

@@ -42,6 +42,7 @@ import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
import org.alfresco.repo.transaction.TransactionUtil;
import org.alfresco.service.cmr.security.AuthenticationService;
import org.alfresco.service.cmr.security.AuthorityService;
import org.alfresco.service.transaction.TransactionService;
import org.alfresco.web.config.ServerConfigElement;
import org.springframework.context.ApplicationContext;
@@ -62,6 +63,7 @@ public class TestWebScriptServer
// dependencies
protected AuthenticationService authenticationService;
protected TransactionService transactionService;
protected AuthorityService authorityService;
protected DeclarativeWebScriptRegistry registry;
protected ConfigService configService;
@@ -118,7 +120,15 @@ public class TestWebScriptServer
{
this.authenticationService = authenticationService;
}
/**
* @param authorityService
*/
public void setAuthorityService(AuthorityService authorityService)
{
this.authorityService = authorityService;
}
/**
* Sets the Messages resource bundle
*
@@ -200,7 +210,7 @@ public class TestWebScriptServer
MockHttpServletRequest req = createRequest(method, uri);
MockHttpServletResponse res = new MockHttpServletResponse();
WebScriptRuntime runtime = new WebScriptServletRuntime(registry, transactionService, null, req, res, serverConfig);
WebScriptRuntime runtime = new WebScriptServletRuntime(registry, transactionService, authorityService, null, req, res, serverConfig);
runtime.executeScript();
return res;
@@ -225,7 +235,7 @@ public class TestWebScriptServer
}
MockHttpServletResponse res = new MockHttpServletResponse();
WebScriptRuntime runtime = new WebScriptServletRuntime(registry, transactionService, null, req, res, serverConfig);
WebScriptRuntime runtime = new WebScriptServletRuntime(registry, transactionService, authorityService, null, req, res, serverConfig);
runtime.executeScript();
return res;