danmunn / redmine_dmsf

Fork of svn repository for redmine_dmsf
GNU General Public License v2.0
413 stars 193 forks source link

Newly created user gets error when using dmsf #1470

Closed Raw1mage closed 10 months ago

Raw1mage commented 10 months ago

A new user is created with the same privilege as the existed members. however, the access to dmsf is broken.

in .../dmsf, the new user can't see the files already visible to old users by the {{dmsff(6)}} macro, the new user's dashboard shows error message as follows:

Error executing the dmsff macro (Couldn't find DmsfFolder with 'id'=6 [WHERE `dmsf_folders`.`deleted` = ? AND (((projects.status <> 9 AND EXISTS (SELECT 1 AS one FROM enabled_modules em WHERE em.project_id = projects.id AND em.name='dmsf')) AND ((projects.id IN (11,13) AND ( ((dfp.object_id IS NULL) OR (dfp.object_id = 13 AND dfp.object_type = 'Role') OR ((dfp.object_id = 24 OR dfp.object_id IN (22)) AND dfp.object_type = 'User')) AND (dmsf_folders.system = FALSE OR 1 = 1) )) OR (projects.id IN (11) AND ( ((dfp.object_id IS NULL) OR (dfp.object_id = 9 AND dfp.object_type = 'Role') OR ((dfp.object_id = 24 OR dfp.object_id IN (22)) AND dfp.object_type = 'User')) AND (dmsf_folders.system = FALSE OR 1 = 0) )))))])

The system back log does not show any error about this. By restarting the redmine docker, not helping. By assigning full privileges to the new user, not helping. By running uninstallation, restart and installation of dmsf, not helping. By assigning the admin privilege to the new user, it works, but not a solution for production.

Raw1mage commented 10 months ago

I found the source of problem.

Since I use the impersonnate plugin to test the new user, who was not really loged in for once, dmsf does not work. When I made the new user actually logged in, there is no problem about dmsf.

Just experience sharing. Cheers.