acs-community-packaging icon indicating copy to clipboard operation
acs-community-packaging copied to clipboard

Can't list users in admin tools

Open narkuss opened this issue 5 years ago • 42 comments

Hi all, when I go to Administrative tools -> Users, Alfresco tries to retrieve users using enterprise endpoint: imatge Versions: Alfresco Share v6.2.0-RC4 Alfresco Community v6.2.0-ea

narkuss avatar Oct 19 '19 14:10 narkuss

I can confirm the issue with Alfresco Share v6.2.0. I also verified, that the issue is not present in Share v6.1.0.

fabtrie avatar Nov 19 '19 13:11 fabtrie

This issue was introduced in Share by the fix required for MNT-20723, PR#115 - Share.

As a workaround that fixes this issue, show-authorization-status property needs to be set to false.

This can be achieved by editing tomcat\webapps\share\WEB-INF\classes\alfresco\share-config.xml and set this property to false, it can be found at line 132. From <show-authorization-status>true</show-authorization-status> To <show-authorization-status>false</show-authorization-status>

Edit: A restart is required for the changes to take place.

Epurashu avatar Nov 27 '19 16:11 Epurashu

As a temporary workaround until the next release of share, you can modify the share Dockerfile in your SDK, or create a custom image from share 6.2.0 and add this lines:

# Patch for https://github.com/Alfresco/acs-community-packaging/issues/367
RUN sed -i 's@<show-authorization-status>true</show-authorization-status>@<show-authorization-status>false</show-authorization-status>@' \
	$TOMCAT_DIR/webapps/share/WEB-INF/classes/alfresco/share-config.xml

narkuss avatar Dec 21 '19 11:12 narkuss

As already expressed on the Alfresco IRC channel today, there should never have been a config option for this. Other console tools show how the license / edition of Alfresco should be checked to toggle Enterprise-specific functionality without requiring a config option.

AFaust avatar Jan 14 '20 16:01 AFaust

This issue was introduced in Share by the fix required for MNT-20723, PR#115 - Share.

As a workaround that fixes this issue, show-authorization-status property needs to be set to false.

This can be achieved by editing tomcat\webapps\share\WEB-INF\classes\alfresco\share-config.xml and set this property to false, it can be found at line 132. From <show-authorization-status>true</show-authorization-status> To <show-authorization-status>false</show-authorization-status>

Edit: A restart is required for the changes to take place.

It don't go for me. I coutinu without see the users.

Can you help me, please?

Lorquimur avatar Feb 01 '20 19:02 Lorquimur

As a temporary workaround until the next release of share, you can modify the share Dockerfile in your SDK, or create a custom image from share 6.2.0 and add this lines:

# Patch for https://github.com/Alfresco/acs-community-packaging/issues/367
RUN sed -i 's@<show-authorization-status>true</show-authorization-status>@<show-authorization-status>false</show-authorization-status>@' \
	$TOMCAT_DIR/webapps/share/WEB-INF/classes/alfresco/share-config.xml

This worked for me

Enquier avatar Jul 27 '20 18:07 Enquier

What do we do with this RUN line? Does it go in the docker-compose.yml? Where?

douglasawh avatar Aug 06 '20 19:08 douglasawh

What do we do with this RUN line? Does it go in the docker-compose.yml? Where?

It goes in DockerFile. But it doesn't work as share-config-custom.xml at /usr/local/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml always replaces the config. You can update the value 'false' in share-config-custom.xml instead.

RUN sed -i 's@<show-authorization-status>true</show-authorization-status>@<show-authorization-status>false</show-authorization-status>@' \
	$TOMCAT_DIR/shared/classes/alfresco/web-extension/share-config-custom.xml
`

abhinavmishra14 avatar Aug 06 '20 20:08 abhinavmishra14

@abhinavmishra14 thanks. I just have the docker-compose.yml I downloaded form https://www.alfresco.com/thank-you/thank-you-downloading-alfresco-community-edition

it looks like I might be able to use "command" in the docker-compose.yml to run the sed command. I will find out!

douglasawh avatar Aug 06 '20 20:08 douglasawh

what I ended up doing was pull down 6.1.0 instead of 6.2.0 (or 6.2.2) in the docker-compose.yml. That resolved the issue. I had already kicked off the docker-compose up when I said I would try "command", but I hadn't actually tried it. I guess I wasn't super confident that would work, lol. glad it did!

I don't know what other issues I might face, but I will keep the command option in mind in case we run into something else. Higher priority items at the moment than the command option. Thanks again for the help.

douglasawh avatar Aug 06 '20 20:08 douglasawh

@douglasawh You can have a look at this docker-compose.yml and take a reference on DockerFile usage. https://github.com/abhinavmishra14/change-acs-share-port-demo/blob/master/docker-compose.yml

abhinavmishra14 avatar Aug 06 '20 21:08 abhinavmishra14

Buenas tardes. Tengo el mismo problema para poder ver la lista de los usuarios de Alfresco 6.2, vi la solución para el problema pero tengo una duda como acceso al siguiente directorio 'tomcat\webapps\share\WEB-INF\classes\alfresco\share-config.xml'.

Estoy trabajando Alfresco con Docker y Solr en debian 10 pero por mas que busco el directorio no lo encuentro. Esto son algunos de los errores que me manda el Solr.

4/2/2021 15:00:30 WARN false   Config XML parse warning in "solrres:/solrconfig.xml",​ line 1919,​ column 88: Include operation failed,​ reverting to fallback. Resource error reading file as XML (href='solrconfig_insight.xml'). Reason: Can't find resource 'solrconfig_insight.xml' in classpath or '/opt/alfresco-search-services/solrhome/alfresco'
4/2/2021 15:00:30 WARN false   Config XML parse warning in "solrres:/solrconfig.xml",​ line 1919,​ column 88: Include operation failed,​ reverting to fallback. Resource error reading file as XML (href='solrconfig_insight.xml'). Reason: Can't find resource 'solrconfig_insight.xml' in classpath or '/opt/alfresco-search-services/solrhome/archive'

4/2/2021 15:00:31 | WARN false |   | SolrResourceLoader | Solr loaded a deprecated plugin/analysis class [org.apache.solr.analysis.WordDelimiterFilterFactory]. Please consult documentation how to replace it accordingly.

JesusTorre avatar Feb 04 '21 22:02 JesusTorre

Buenas tardes. Tengo el mismo problema para poder ver la lista de los usuarios de Alfresco 6.2, vi la solución para el problema pero tengo una duda como acceso al siguiente directorio 'tomcat\webapps\share\WEB-INF\classes\alfresco\share-config.xml'.

Estoy trabajando Alfresco con Docker y Solr en debian 10 pero por mas que busco el directorio no lo encuentro. Esto son algunos de los errores que me manda el Solr.

4/2/2021 15:00:30 WARN false   Config XML parse warning in "solrres:/solrconfig.xml",​ line 1919,​ column 88: Include operation failed,​ reverting to fallback. Resource error reading file as XML (href='solrconfig_insight.xml'). Reason: Can't find resource 'solrconfig_insight.xml' in classpath or '/opt/alfresco-search-services/solrhome/alfresco' 4/2/2021 15:00:30 WARN false   Config XML parse warning in "solrres:/solrconfig.xml",​ line 1919,​ column 88: Include operation failed,​ reverting to fallback. Resource error reading file as XML (href='solrconfig_insight.xml'). Reason: Can't find resource 'solrconfig_insight.xml' in classpath or '/opt/alfresco-search-services/solrhome/archive' 4/2/2021 15:00:31 | WARN false |   | SolrResourceLoader | Solr loaded a deprecated plugin/analysis class [org.apache.solr.analysis.WordDelimiterFilterFactory]. Please consult documentation how to replace it accordingly.

Revisa la documentación de dockers... yo hice un "docker ps" para ver el id del docker y luego un "docker exec it" con el id ya ahi modificas el archivo y reinicias el docker

suerte

chatoros avatar Feb 05 '21 15:02 chatoros

@chatoros, buenas tardes.

Aplique el comando docker ps y obtuve el id del contenedor pero al momento de aplicar el siguiente comando sudo docker exec it asderee233 me dice error en el comando it y si lo aplico de la siguiente manera sudo docker exec -it asderee233 me dice que requiere de dos argumentos.

Donde: asderee233->id de ejemplo

JesusTorre avatar Feb 10 '21 19:02 JesusTorre

Parece que te falta el bash, yo lo uso asi: docker exec -it 180b7d246694 /bin/bash

chatoros avatar Feb 10 '21 19:02 chatoros

Well.... looks like Alfresco 7.0 was released (or at least tagged), and it still contains the same issue, as there has been no change to the default configuration which breaks this for community, and the flag still results in Enterprise API being called.

AFaust avatar Mar 13 '21 16:03 AFaust

Changed files

webapps/share/components/console/users-min.js webapps/share/components/console/users.js

Ajustment this people-enterprise to people.

image

DenysLP avatar Apr 12 '21 01:04 DenysLP

I have the same error, with the last version of Alfresco installed using Docker Desktop. How I can resolve it?

TripleeDouble avatar Apr 19 '21 13:04 TripleeDouble

alfresco 7.0 has the same problem.

summerduanlina avatar May 25 '21 03:05 summerduanlina

Alfresco 7.0 still has the same problem also the solution to changed show-authorization-status property to false is not work because it's already set to False at the first place.

hottodoguru avatar Jun 02 '21 08:06 hottodoguru

It`s unfortunate to hear that this problem is still ongoing for the past 2 years. Is there any other work-around that works in Alfresco 7?

RAurelian avatar Jun 02 '21 12:06 RAurelian

The amount of redundant "I have the same error", different "solutions" (some of them dirty hacks), false claims of "does not work" etc. on this issue is honestly astounding. Too bad Alfresco is not doing anything against it, like fixing the underlying issue.

For the record, the following configuration file as a share-config-custom-dev.xml in e.g. tomcat/shared/classes/alfresco/web-extension/ has worked for me in all affected Alfresco versions:

<?xml version='1.0' encoding='UTF-8'?>
<alfresco-config>

   <config evaluator="string-compare" condition="Users" replace="true">
      <users>
         <username-min-length>2</username-min-length>
         <password-min-length>3</password-min-length>
         <!-- fix/workaround for https://github.com/Alfresco/acs-community-packaging/issues/367 -->
         <show-authorization-status>false</show-authorization-status>
      </users>
      <enable-external-users-panel>false</enable-external-users-panel>
   </config>
</alfresco-config>

This can be added either via a custom image build or by simply mounting the file into the container. The share-config-custom-dev.xml file is always loaded after any share-config-custom.xml, regardless if they were provided by extension modules or via the server configuration path.

As I have written in March and proven with a direct link to the source code, the default configuration of show-authorization-status property has not changed and is still true, contrary to what @hottodoguru claims. The same setting is repeated in the sample share-config-custom.xml which one may find in the distribution ZIP, as well as the same file for the Docker distribution.

AFaust avatar Jun 02 '21 15:06 AFaust

Changed files

webapps/share/components/console/users-min.js webapps/share/components/console/users.js

Ajustment this people-enterprise to people.

image

Tanks, solved on Alfresco Community 7.0

waldodurpo avatar Oct 20 '21 18:10 waldodurpo

Very Good!

mantvs avatar Dec 14 '21 22:12 mantvs

更改的文件

webapps/share/components/console/users-min.js webapps/share/components/console/users.js

调整这个以人为本的企业——以人为本。

图片

Tanks, solved on Alfresco Community 7.2 在最新的 Alfresco Community 7.2 上用这个方法也成功解决了问题,不需要修改配置webapps/share/WEB-INF/classes/alfresco/ share-config.xml里的

15394730733 avatar Jan 18 '22 03:01 15394730733

There is no folder "web-extension" in "tomcat/shared/classes/alfresco" on Alfresco Community 7.1 (docker installation), and try to create the "web-extension" manually then add "share-config-custom-dev.xml" in it. But still not working. Can someone who has experienced on this bug can tell me how to fix it? Thanks!

IsonXXXX avatar May 25 '22 07:05 IsonXXXX

I encounter the same issue with Alfresco Community 7.3. Users don't show up, even after verifying that show-authorization-status value was set to false in tomcat/webapps/share/WEB-INF/classes/alfresco/share-config.xml (which I modified using a Dockerfile). Thank you for your help.

vpaillusson avatar Sep 02 '22 09:09 vpaillusson

Found out what was the problem. There was actually already a share-config-custom.xml in $TOMCAT_DIR/shared/classes/alfresco/web-extension/ in which show-authorization-status was set to true. Modifying this property to false in the same as share-config.xml through Dockerfile and then rebuilding the container did the trick.

vpaillusson avatar Sep 02 '22 16:09 vpaillusson

Cannot believe that they did not fix this thing or add them in the document.

tannineo avatar Sep 27 '22 16:09 tannineo

This bug is also in 7.2.1 installed using ansible. See http://github.com/Alfresco/alfresco-ansible-deployment

However, I cannot find the offending file. Does anyone know where it is?

Thanks John

jpmahon avatar Nov 14 '22 19:11 jpmahon