Additional page on administration tools page. Allows user with admin permissions login under another account registered in alfresco without knowing his/her password. Admin sees table with all user logins. He can select user login and click on Switch User action button. After this action, admin will be redirected to user home page. Security context will be replaced with chosen user.
- Build 2 jars using maven build files under repo-login-switcher and share-login-switcher:
- open terminal in ./repo-login-switcher and run the command
mvn clean package
- open terminal in ./share-login-switcher and run the command
mvn clean package
- Copy files from target folders:
- Copy repo-login-switcher-1.5.jar into {alfresco_installation_folder}/tomcat/webapps/alfresco/WEB-INF/lib
- Copy share-login-switcher-1.5.jar into {alfresco_installation_folder}/tomcat/webapps/share/WEB-INF/lib
Start alfresco
In order to use the User Switcher plugin in SDK 4 you need to place the plugin's jar files in Tomcat directory into the docker image. JAR extensions are copied directly into the exploded webapp. To do this, follow these steps.
- Clone source files.
- Open terminal in user-switcher package and run the command:
mvn package
- Create in package your-alfresco-SDK4/your-alfresco-platform-docker/ package jars.
- Create in package your-alfresco-SDK4/your-alfresco-share-docker/ package jars.
- Copy repo-login-switcher-1.5.jar from user-switcher/repo-login-switcher/target/ to your-alfresco-SDK4/your-alfresco-platform-docker/jars.
- Copy share-login-switcher-1.5.jar from user-switcher/share-login-switcher/target/ to your-alfresco-SDK4/your-alfresco-share-docker/jars.
- Open in editor your-alfresco-SDK4/your-alfresco-platform-docker/pom.xml and add new execution :
<execution>
<id>copy-jar</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/extensions</outputDirectory>
<resources>
<resource>
<filtering>false</filtering>
<directory>jars</directory>
</resource>
</resources>
</configuration>
</execution>
in:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.0.2</version>
<executions>
...
<executions>
</plugin>
</plugins>
</build>
- Do the same for your-alfresco-SDK4/your-alfresco-share-docker/pom.xml.
- And now in your-alfresco-SDK4/ open terminal and run the command:
./run.sh build_start
- Login in Alfresco with admin permissions and choose Admin Tools:
- Select Login manager:
- Users will be shown in the table:
- Choose user and push Switch user:
- You are login under another account:
- Open the directory in which you downloaded docker-compose.yml file and create two packages repo and share.
- Copy repo-login-switcher-1.5.jar to your-alfresco-enterprise/repo.
- Copy share-login-switcher-1.5.jar to your-alfresco-enterprise/share.
- Create Dockerfile in your-alfresco-enterprise/repo:
FROM alfresco/alfresco-content-repository:6.1.0
ARG TOMCAT_DIR=/usr/local/tomcat
COPY *.jar $TOMCAT_DIR/webapps/alfresco/WEB-INF/lib/
- Create Dockerfile in your-alfresco-enterprise/share:
FROM alfresco/alfresco-share:6.1.0
ARG TOMCAT_DIR=/usr/local/tomcat
COPY *.jar $TOMCAT_DIR/webapps/share/WEB-INF/lib/
- In docker-compose.yml replace:
alfresco:
image: alfresco/alfresco-content-repository:6.1.0
with:
alfresco:
build: ./repo
and
share:
image: alfresco/alfresco-share:6.1.0
with:
share:
build: ./share
- Run Alfresco:
docker-compose up
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.