From 734381d124dea0d2be7ee060ee0269ccf895c469 Mon Sep 17 00:00:00 2001 From: Charles Le gallic Date: Thu, 24 Nov 2016 18:45:43 +0100 Subject: [PATCH] Readme file --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..e91ac3b --- /dev/null +++ b/README.md @@ -0,0 +1,28 @@ +alfresco-js-run-as-user +======================= + +Allows to use the "AuthenticationUtil.runAs(...)" Java method in the javascript API. + +The module exposes a new root object "runAsUserUtil" with a single runAs(userid, function) method. + +For example, use it in a WebScript Javascript controller + + runAsUserUtil.runAs( + "admin", + function(){ + model.companyhomeList = companyhome.children; + model.sitesList = siteService.listSites(null, null, 0); + } + ); + +The module is also provided with a sample WebScript : http://localhost:8080/alfresco/s/runasuser/demo?id=abeecher + +Manual Installation +------------------- +Use `mvn install` to create the AMP. + +You can then install the AMP as you normally would using the MMT. + +Alternatively, you can use the Maven plug-in to install the AMP by running `mvn alfresco:install -Dmaven.alfresco.warLocation=$TOMCAT_HOME/webapps/alfresco` if you are running your Alfresco WAR expanded, or specify the WAR if you are running unexpanded. + +No further config or setup is necessary. \ No newline at end of file