Add user ID tracking for versions
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-11-02 12:10:52 -06:00
parent 3aab56b5ac
commit 6469beb341
5 changed files with 20 additions and 17 deletions

View File

@@ -203,7 +203,7 @@ class Page extends VersionedModel {
this[`shared_users_${level}`].push(user._id)
// TODO replace user.uid with name of user when we support that
await this.version_save(`Shared with ${user.uid} (${level} access)`)
await this.version_save(`Shared with ${user.uid} (${level} access)`, user.id)
await user.save()
}
@@ -219,7 +219,7 @@ class Page extends VersionedModel {
this.shared_users_update = this.shared_users_update.filter(x => String(x) !== user.id)
this.shared_users_manage = this.shared_users_manage.filter(x => String(x) !== user.id)
await this.version_save(`Unshared with ${user.uid}`)
await this.version_save(`Unshared with ${user.uid}`, user.id)
await user.save()
}