Skip to content

Commit

Permalink
Readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
clegallic committed Nov 24, 2016
1 parent 6f1e347 commit 734381d
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 734381d

Please sign in to comment.