-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIXED BUG #18589 about Project tasks linked file access denied #18617
Conversation
@@ -2293,7 +2295,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, | |||
|
|||
// Find the subdirectory name as the reference. For exemple original_file='10/myfile.pdf' -> refname='10' | |||
if (empty($refname)) { | |||
$refname = basename(dirname($original_file)."/"); | |||
$refname = basename(dirname($original_file, 2)."/"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you add ",2" parameter it means that for original_file = a/b/c, dirname(original_file, 2) will return
a
But here we want
b
Old code seems good.
Which value did you receive in $original_file ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I partially agree with you as I am not experienced as you are in Dolibarr. But here...
a= Project Reference
b= Task Reference inside the above project
c= Filename
Dolibarr creates directory for each and every project to store linked files in it. Now tasks files are stored new directory inside the project directory. So you must know the a, before you go to b. I have fixed it and it is completely working in my system pretty good. I will suggest to check once again. Thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good morning,
Dolibarr V 14.0.2 latest update already installed and problem persisting.
I've also changed code following your instructions but still facing the same problem. The most surprising is that depending in system, problem is persisting or not. I mean, I tested 2 desktop PCs, 3 mobile/tablets and all of them working fine, but from laptops (Lenovo & MacBook Air) we are facing problems, no matter from which country do we try or the navigator we use (Chrome or Edge). I don't know if it makes sense, but seems that problems are generated by laptops??!!
Best regards and grateful, hope you could help us. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dolibarr V 14.0.3 latest update already installed and problem persisting.
18617 In v14.0.2 it doesn't work for me either. In addition, thumbnails of events are not visible, they can be opened, but a blank icon is displayed. |
Same here. How can be requested to "reopen" an issue in GIthub/Dolibarr ? |
Hi, Anyone following this issue????? Thanks. |
#18716 """"Solved"""" |
In 14.0.3 the problem persist, returning a problem of permissions, even using the admin user with all the rights enabled: Access denied. Current login: admin |
The problem persist in 14.0.5 |
Instructions
#18589 linked files with the task is not working. And it is fixed. Hopefully it will be merged.