Add user ID tracking for versions
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user