-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |