You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason will be displayed to describe this comment to others. Learn more.
There is an interesting gotcha here, where adding editors to the values call, because editors is a many to many field, if there is more than one editor, then this will cause the same channelset to be returned multiple times in the resultant query (each with a different editors value corresponding to each editor).
Although currently we have no way in the interface of adding additional editors to a collection, I imagine we will do so at some point in the future.
I would instead do this consistently with how we filter Channels, and instead annotate an edit flag on the viewset, which is then different on a per user basis.
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback - I've made some updates based on these notes and our conversation yesterday, and I think it's now using the approach you suggest. Let me know if you have any other comments!
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
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.
What does this PR do? Briefly describe in 1-2 sentences
This PR filters the ChannelSetList (aka "Collections") so that only the current user's Collections are displayed.
Issue Addressed (if applicable)
Addresses #2542 - Admins can see all Channelsets/Collections, even if they do not have edit access to them
Steps to Test
At a high level, how did you implement this?
I created a FilterSet on the backend for ChannelSetList and passed a parameter in the front end .where() query and updated tests for this change.