Skip to content

[#5698] Filter activities from user at the database level #5699

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

Merged
merged 5 commits into from
Nov 6, 2020

Conversation

amercader
Copy link
Member

Fixes #5698

The ckan.hide-activity-from-users configuration option allows you to define the users that you don't want to show activities from on the various activity feeds. It defaults to the internal site user as this is generally used to perform bulk internal processes like harvesting and you don't want to flood the activity stream with their operations.

The problem is that we first get the relevant activities from the database and then filter these activities in Python based on the users in the config option.

This means that if more activities from the site user were performed than the limit requested, they are filtered out and you get an empty feed, even though the activities are still there.

These moves the filtering to the model queries so the actions already get filtered lists with the relevant activities.

Fixes #5698

The `ckan.hide-activity-from-users` configuration option allows you to define
the users that you don't want to show activities from on the various activity
feeds. It defaults to the internal site user as this is generally used to
perform bulk internal processes like harvesting and you don't want to flood
the activity stream with their operations.

The problem is that we first get the relevant activities from the
database and then filter these activities in Python based on the users
in the config option.

This means that if more activities from the site user were performed
than the limit requested, they are fltered out and you get an empty
feed, eventhough the activities are still there.

These moves the filtering to the model queries.
@amercader amercader marked this pull request as ready for review October 29, 2020 08:34
@smotornyuk smotornyuk merged commit 8eec3e2 into master Nov 6, 2020
@amercader amercader deleted the 5698-fix-missing-activities branch January 15, 2021 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Activities dissappear from UI when internal processes are run by ignored users
2 participants