-
Notifications
You must be signed in to change notification settings - Fork 63
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
[Bugfix] CheckPermissions.php #213
Conversation
haraldwitt
commented
Jul 7, 2023
* Get FeGroups that are allowed to view a file/folder (checks NOT full rootline) * Check from the given folder up to root, i. e. the reverse! rootline. * First restriction matches. * * This Bugfix should be sure because it's only called from: * - Aspects/SolrFalAspect.php * - Hooks/KeSearchFilesHook.php * * This Bugfix resolvees issues: * - #161 * - #166
* Check from the given folder up to root, i. e. the reverse! rootline. | ||
* First restriction matches. | ||
* | ||
* This Bugfix should be sure because it's only called from: |
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.
Please remove the comments about the bug fix here.
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.
Ok, I'll do it
*/ | ||
public function getFolderRootLine(FolderInterface $folder) | ||
{ | ||
return array_reverse($this->getReverseFolderRootLine($folder)); |
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.
This would mean a double array_reverse
. It's better to do it the other way around. That way you'll only need one array_reverse
. So move the code from getReverseFolderRootline
to getFolderRootline
, remove the array_reverse
on the return and change getReverseFolderRootline
to return array_reverse($this->getFolderRootline($folder));
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.
No, there's only this one array_reverse() in all the code. The method $this->getReverseFolderRootLine() builts the reverse array native.
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.
There's an array_reverse
on line 258 at the end of getReverseFolderRootLine
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.
Oops, in my patched version it was removed. Forgot it here. Sorry for that.
Thank you for your attention :-)
And should we rename the array $rootLine
inside getReverseFolderRootline()
to $reverseRootLine
for clearness?
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.
Comments removed
array_reverse() removed from return value of getReverseFolderRootline().
What about merging this into 4.0.3 and 5.0.1? |
If this is okay by you can merge and release this. @haraldwitt |
I think That's ok for everyone. |
Great. Many thanks. |
Oh no. So I have do downgrade to fal_securedownload 5.0.1 :-( Or is it possible to re-activate the Class SolrFalAspect for compatibility reasons? Thanks |
I might be able to look into this on friday, but not sure yet. |
@joey-bolts Thanks a lot and I'll be back, as soon as I'm using Typo3 12 :-) |