fix: assets permission issues #1926 - #1928
Merged
Merged
Conversation
Contributor
Author
|
@NGPixel did you have a chance to look at this PR? I think this is an important fix... |
Contributor
Author
|
@NGPixel sorry to bother, I'm sure you are very busy. I saw you made a new release which is aswome and I already upgraded to it. But in order for me to publicly expose parts of my wiki, I need that fix. I hope you can CR it before the next release. |
NGPixel
requested changes
Jun 7, 2020
| const folderHierarchy = await WIKI.models.assetFolders.getHierarchy(args.folderId) | ||
| const folderPath = folderHierarchy.map(h => h.slug).join('/') | ||
| let results = await WIKI.models.assets.query().where(cond) | ||
| results = _.filter(results, r => { |
Member
There was a problem hiding this comment.
Don't reassign results here. Should be const results = ... then you return the _filter().map() as 1 chained statement.
| return result | ||
| const parentHierarchy = await WIKI.models.assetFolders.getHierarchy(args.parentFolderId) | ||
| const parentPath = parentHierarchy.map(h => h.slug).join('/') | ||
| results = _.filter(results, r => { |
Member
There was a problem hiding this comment.
Same issue here. Don't reassign, return the result directly.
Contributor
Author
|
Thanks @NGPixel I fixed your comments. |
NGPixel
approved these changes
Jun 7, 2020
Contributor
Author
|
Thanks @NGPixel! Really an awesome project :-) |
jionggyu
pushed a commit
to jionggyu/wiki-2.5.302-patch
that referenced
this pull request
Jul 9, 2024
* fix: assets permission issues requarks#1926
rainforwind
pushed a commit
to rainforwind/wikijs
that referenced
this pull request
Aug 30, 2026
* fix: assets permission issues requarks#1926
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: #1926
Added permission filtering when listing assets and folders