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

Safe post_count for Tags & Users #6091

Merged
merged 1 commit into from
Nov 19, 2015
Merged

Safe post_count for Tags & Users #6091

merged 1 commit into from
Nov 19, 2015

Conversation

ErisDS
Copy link
Member

@ErisDS ErisDS commented Nov 18, 2015

This is a dirty bare-minimum PR to add post_count to users and to make sure that post_count is 'safe' in that it only returns public data when a public request is made.

Additional work is needed to 1) make it possible to use counts in filters and orders, and 2) change the name from post_count to count.posts as well as 3) write proper unit tests for the count plugin.

refs #6009, #5614

  • Use the new isPublicContext method to detect whether to add extra clauses to the count
  • Add count to users

refs TryGhost#6009, TryGhost#5614

- Use the new isPublicContext method to detect whether to add extra clauses to the count
- Add count to users
@ErisDS
Copy link
Member Author

ErisDS commented Nov 19, 2015

Have fixed up the issue that caused MySQL to fail here. All good now.

sebgie added a commit that referenced this pull request Nov 19, 2015
Safe post_count for Tags & Users
@sebgie sebgie merged commit 55564e3 into TryGhost:master Nov 19, 2015
@ErisDS ErisDS deleted the safe-count branch November 22, 2015 18:12
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

Successfully merging this pull request may close these issues.

2 participants