Skip to content
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

Activity stream protection should take place only when activity query may turn up Docs items #645

Closed
boonebgorges opened this issue Nov 9, 2018 · 1 comment
Milestone

Comments

@boonebgorges
Copy link
Owner

bp_docs_access_protection_for_activity_feed() filters all activity queries to ensure that no off-limits Docs-related content gets into the activity feed. But the query introduces some database/cache overhead, and doesn't need to be performed if there's no chance that the activity query will include any Docs-related activity. We can generally tell this by looking at some combination of the activity query params and the SQL itself. Basically:

  • if 'bp_docs_*' is in the SQL/params, we should filter
  • if it's "all" scope - no type/component - then we should filter
  • otherwise we don't have to
@boonebgorges boonebgorges added this to the 2.1.2 milestone Nov 9, 2018
boonebgorges added a commit that referenced this issue Nov 9, 2018
@boonebgorges
Copy link
Owner Author

@dcavins I've gone ahead and pushed this in, but please feel free to review - I think it's sufficiently cautious.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant