tuxgasy/docker-dolibarr

Cannot enable Module Users

jeritiana opened this issue · 2 comments

Hi there,

Is it normal that the module Users & Groups is not enabled by default on the Docker installation?

Docker installation
image
image

Host installation
image
image

According to the documentation, it is a mandatory module that cannot be disabled, but here it looks like it is not enabled at all...

The impact is that the Users & Groups section is not available in the permissions section (image source).
image

Infos
Seen on tuxgasy/dolibarr:16.0.0.
Reproduction:

  • Run Dolibarr with Docker
  • Check Home > Setup > Modules

Hi @jeritiana,

Not sure it's related to this docker integration, I didn't see any reason for this module deactivated on the docker build process.

Do you raised this issue on dolibarr repository ?

Hi @mathieupotier

Thank you for following up on this issue. I am not sure this is related to the upstream dolibarr repository, and it's actually quite easy to reproduce. Here is what I did.

Steps

  1. Install Dolibarr 16.0.1 on Debian (official installation method)
  • Spin up a brand new Debian VM (here, Debian 9 because that's the default available version when using WSL2)
  • Install DoliDeb with dolibarr_16.0.1-4_all.deb following Dolibarr_for_Ubuntu_or_Debian and this fix Dolibarr/dolibarr#20894 (comment) - along with required dependencies.
  • Go to /install and use default values.

I noticed that the Module Users is enabled. Here is an excerpt of the database:

> select * from dolibarrdebian.llx_const where name = 'MAIN_MODULE_USER';
+-------+------------------+--------+-------+--------+---------+--------------------------------------------------------------+---------------------+
| rowid | name             | entity | value | type   | visible | note                                                         | tms                 |
+-------+------------------+--------+-------+--------+---------+--------------------------------------------------------------+---------------------+
|    40 | MAIN_MODULE_USER |      0 | 1     | string |       0 | {"authorid":0,"ip":"::1","lastactivationversion":"dolibarr"} | 2022-11-03 10:00:09 |
+-------+------------------+--------+-------+--------+---------+--------------------------------------------------------------+---------------------+
  1. Run Dolibarr 16.0.1 with Docker using this repository
  • Use the provided docker-compose.yml and explicitly use tuxgasy/dolibarr:16.0.1-php8.1.
    The install process is run by default with DOLI_INSTALL_AUTO=1.

The Module Users is not enabled and the SQL request returns nothing:

> select * from dolibarr.llx_const where name = 'MAIN_MODULE_USER';
Empty set (0.000 sec)

As a current workaround, inserting the line above (with MAIN_MODULE_USER) enables the module on the Docker installation.

Takeaways

Could there be something missing somehow on the Dolibarr install process used here? Not on the Docker image build process. For example, one can confirm that this data record is relevant by looking at the Dolibarr demo SQL dump.

I think of two possibilities:

  1. Add another default const in docker-run.sh. See https://github.com/tuxgasy/docker-dolibarr/blob/master/docker-run.sh#L154.
echo "Set some default const ..."
...
  1. Or there could be a whole missing part when compared to the upstream Dolibarr install process. See for example https://github.com/Dolibarr/dolibarr/blob/16.0/htdocs/install/upgrade2.php#L523