-
Notifications
You must be signed in to change notification settings - Fork 44
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
Added multitag support #542
base: master
Are you sure you want to change the base?
Conversation
Store the calculated array of protected doc IDs in the `BP_Docs_Access_Query` singleton class to avoid calculating the list more than once.
Adds a new taxonomy to store the comment access setting for each doc. This will allow us to protect comments that should be hidden from the user.
Add comment-specific code to BP_Docs_Access_Query so that we can filter comments based on doc settings.
Two major components: * Filter WP_Comment_Query so that comments on docs are handled according to the doc’s privacy settings. * Protect activity stream items that are created by commenting on a doc.
* Rather than storing this data in the singleton, move to WP cache with dreams of moving to a persistent cache in the future. * Add tests showing that the access protection queries are not duplicated.
Store the calculated array of protected doc IDs in the `BP_Docs_Access_Query` singleton class to avoid calculating the list more than once.
Adds a new taxonomy to store the comment access setting for each doc. This will allow us to protect comments that should be hidden from the user.
Add comment-specific code to BP_Docs_Access_Query so that we can filter comments based on doc settings.
Two major components: * Filter WP_Comment_Query so that comments on docs are handled according to the doc’s privacy settings. * Protect activity stream items that are created by commenting on a doc.
* Rather than storing this data in the singleton, move to WP cache with dreams of moving to a persistent cache in the future. * Add tests showing that the access protection queries are not duplicated.
Sometimes, we need to handle access queries for multiple users on a page load. The existing singleton structure returned the singleton calculated for the first user every time.
If a user shouldn’t be able to see the activity item, don’t send them an email about it either. Adds a filter for the “all email” action and the action that adds activities to the digest queue.
New tests: * Non-logged-in users shouldn’t see logged-in only items. * No one but the author should see creator-only items. * Non-group members shouldn’t see group-member-only items.
… activity-stream-exclusions # Conflicts: # includes/activity.php # tests/test-bp-docs.php
Introduce a `last_changed` incrementor so that restricted doc IDs, comment doc IDs, and comment IDs stay fresh.
Send `bp_docs_update_doc_access()` the right values to work with.
Add test for `get_doc_ids()`. Test protections for docs with read access limited to group admins and mods.
Add tests for `get_restricted_comment_doc_ids()` and `get_comment_ids()`. Test loggedin, creator-only, group members, and group admins and mods protections for docs with limited comment read access and their child comments.
Earlier tests checked that users were prevented from accessing certain docs. These new tests check that user are not prevented from accessing docs to which they should have access.
Mark the changes related to comment and activity item protection as going in at version 2.0, not 1.9.1.
Thank you so much for the pull request! I love the functionality. A couple questions. First, there are some merge conflicts that are arising, primarily because you are working off of
Github should recognize that you're using the same branch name, and update this PR. (If you can't do all of this, we can continue to work off of the current PR.) On the substance of the PR:
Thanks! |
Hi! |
By default the code of this module supports more than one tag separated by comma (bpd_tag=tag1, tag2), but it's not possible to select more than one from the filtering page. This patch lets select more than one tags when filtering: