Karaage-Cluster/karaage

datastore events for project or institute not in machine_category

Closed this issue · 2 comments

As mentioned in change 771ef6e, it is possible for a person to join a project/institute, which will result in add_account_to_project and add_account_to_institute for every account, even when the project/institute does not belong in the machine_category for the account.

This means that the data store will receive add_account_to_institute and add_account_to_project for projects it has never heard of.

We need to filter these events so we only call the above methods for project/institute that are in the relevant machine categories. Or rather, we should only call add_account_to_project and add_account_to_institute if both the account and the institute belong to the same machine category.

Fixed in e60f2cd.