Merge pull request #17400 from overleaf/msm-fix-permissions-disconnection

[web] Fix editor still enabled during disconnection

GitOrigin-RevId: 55bf7a6a8a77850c86011f1e70930b354a9d7e98
This commit is contained in:
Miguel Serrano 2024-03-06 10:30:20 +01:00 committed by Copybot
parent 1c34a3fa68
commit ee4b8c0868

View file

@ -248,7 +248,7 @@ export default ConnectionManager = (function () {
this.updateConnectionManagerState('inactive')
this.shuttingDown = true // prevent reconnection attempts
this.$scope.$apply(() => {
this.$scope.permissions.write = false
this.$scope.permissions = { ...this.$scope.permissions, write: false }
return (this.$scope.connection.forced_disconnect = true)
})
// flush changes before disconnecting