mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.1 to HEAD
13256: Fix ETHREEOH-1221 Hard-coded use of "admin" username ___________________________________________________________________ Modified: svn:mergeinfo Merged /alfresco/BRANCHES/V3.1:r13256 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13613 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -67,6 +67,14 @@ public class TestWebScriptRepoServer extends TestWebScriptServer
|
||||
}
|
||||
|
||||
/**
|
||||
* Get default user name
|
||||
*/
|
||||
protected String getDefaultUserName()
|
||||
{
|
||||
return AuthenticationUtil.getAdminUserName();
|
||||
}
|
||||
|
||||
/**
|
||||
* Main entry point.
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
@@ -91,12 +99,12 @@ public class TestWebScriptRepoServer extends TestWebScriptServer
|
||||
}
|
||||
|
||||
private final static String[] CONFIG_LOCATIONS = new String[]
|
||||
{
|
||||
"classpath:alfresco/application-context.xml",
|
||||
"classpath:alfresco/webscript-framework-application-context.xml",
|
||||
"classpath:alfresco/web-scripts-application-context.xml",
|
||||
"classpath:alfresco/web-scripts-application-context-test.xml"
|
||||
};
|
||||
{
|
||||
"classpath:alfresco/application-context.xml",
|
||||
"classpath:alfresco/webscript-framework-application-context.xml",
|
||||
"classpath:alfresco/web-scripts-application-context.xml",
|
||||
"classpath:alfresco/web-scripts-application-context-test.xml"
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieve an instance of the TestWebScriptServer
|
||||
@@ -155,7 +163,7 @@ public class TestWebScriptRepoServer extends TestWebScriptServer
|
||||
}
|
||||
catch(AuthenticationException e)
|
||||
{
|
||||
executeCommand("user admin");
|
||||
executeCommand("user " + getDefaultUserName());
|
||||
}
|
||||
|
||||
// execute command in context of currently selected user
|
||||
|
Reference in New Issue
Block a user