-
-
Notifications
You must be signed in to change notification settings - Fork 835
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
fix: add viewPrivate visibility scope #3596
base: 2.x
Are you sure you want to change the base?
Conversation
Looked through the code a bit and from what I can understand, the idea of that block of code in the scoper is to hide discussions where the first post is private (waiting approval or hidden or anything else of the sort). In which case I think it would be better to drop the However, whatever solution we try t go with, we need to setup the necessary related tests first. |
Signed-off-by: Sami Mazouz <[email protected]>
I set up the integration tests for the behavior we want to keep and the behavior we want to fix, so one of the tests currently naturally fails (even with the initial fix). This will make it easier to dig into the current logic and how we might want to tweak it. |
Was this intended to be marked as ready for review? |
@askvortsov1 nope! not sure how that happened 😅 |
This is low priority, can wait until 2.x minor releases. |
**Fixes #3594 **
Changes proposed in this pull request:
Allow discussions to be conditionally visible via
viewPrivate
scopers, when the user does not have theeditPosts
permission.I feel that improving the tests for
flarum/approval
is also required, unfortunately I cannot run them locally atm, so perhaps someone would be kind enough to add?Reviewers should focus on:
I've tested this change with 3rd party extensions, such as
fof/byobu
, which also makes use ofviewPrivate
, and there does not appear to be any side effects, but perhaps there's something I've not considered by opening this up a little?Screenshot
Necessity
Confirmed
composer test
).Required changes: