-
Notifications
You must be signed in to change notification settings - Fork 33
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
Bug in tree view directory ? #166
Comments
Both versions you use are already out of support. Please upgrade first. |
I've update to PHP 7.4, but same issue... |
Thank's for you comment ! |
Please read the commit message. As far as I understood @ams-tschoening it might lead to errors if permissions are restrictive. Maybe this can be turned into a config option to provide old behavior, if required. WDYT? |
Please provide the concrete URLs you are opening and observing the wrong rendering. Look at the linked PR, go to that code base and simply change OTOH, there were rendering changes regarding open closed files and directories in the past. Maybe your problem is related to those instead: |
I've just change the $level to 0. So yes, is it possible to add an option in the conf file to manage this ? |
Can you attach a snapshot how it looks after changing |
There is a wider underlying problem here: What to render if NO restrictions are in place vs. when those ARE in place and people have access to subdirs only. Having a config, one can only switch between using my different implementation and not, while there can easily be different repos with and without access restrictions published by the same WebSVN. So in theory that config would need to per repo and even that wouldn't work for people who simply have access to all subdirs within the repo. From my understanding, the correct implementation would start at the root of the repo and check if that is readable or not. If so, things are fine and contents can be rendered. If not, one would need to decide what to render instead, because we have two cases: either the user is not allowed to see anything of the requested path or only some subpaths. What to render heavily depends on those results and the former implementation simply stopped at the root without access. That is wrong as well as is not rendering the parents if those are visible, like seems to be the case for the reporter of this issue. Though, I wonder why that doesn't happen already to other users? Starting to check/render with a subdir should happen pretty often and the current implementation doesn't check if auth restrictions are in place or stuff like that. That's the whole problem... Anyway, maybe my PR should simply be reverted for now to have the old behavior? My use case might be pretty special and I'm somewhat sure to abandon WebSVN for that use case in future anyway most likely. Handling these cases correctly seems to be pretty difficult, so the old wrong behaviour working for most people might be the easiest way to go. |
The current behavior is beneficial for the performance. Regardless of this, the option is even per-user/-group because it well be different for both. I think we should resemble the same behavior |
And how does that look like? @ogou Do you have any access restrictions for your repos in place? |
I can't exactly tell, need to look into source, but the output is always level aware. It does show only the current dir context. |
No restriction in my configuration. |
The SVN output should always show the current path or current directory. I think even visual SVN repo browser does the same. It focuses only on the current directory. |
The parent names of the requested directory could as well be rendered always without any content and without any access checks. Really only print the directory names. That would show what @ogou misses now, use cases with access restrictions in subdirs would keep working and performance would stay the same as currently. Something like:
OTOH, the output would be different from the past. Without access checks, one couldn't provide the last log message and stuff. @ogou Please try |
I've try to add this parameter into the config.php file. So for me, the best solution would be this modification -> |
So for the time being, the easiest solution is you fork the repo, change that code yourself and maintain your own fork. However things will be changed here, when updating, GIT will easily tell you about possible conflicts and you can decide what to do. The other easiest option would be reverting my changes and decide later how to deal with those. As said, I don't care too much anymore and that might not be worth breaking other users with their use-cases. |
I would accept an option. Have all the tree costs too much performance and doens't really make sense. I'd object a pure revert. |
I too object on a pure revert. |
Hi @ogou, |
No option in the conf file right now. And add |
Do you want to provide a patch for this config option? |
I'm using websvn with the tree view and Calm template.
It seem to have a bug with the Path/Tree view directory presentation.
I can't see path directory in the tree view (can just see the files).
Version:
PHP 7.2.24
Apache/2.4.37
The text was updated successfully, but these errors were encountered: