diff options
author | Heiko Bernloehr <Heiko.Bernloehr@FreeIT.de> | 2017-03-15 00:22:11 +0100 |
---|---|---|
committer | Heiko Bernloehr <Heiko.Bernloehr@FreeIT.de> | 2017-03-15 00:22:11 +0100 |
commit | 3f284100ba0b709881c4b6ae80c9c3ec4caa4d3d (patch) | |
tree | 37e660ae1f1f9c45973652fd4a4d5db3472c4952 | |
parent | c1a1a813536f694203a6ed6a5186c40079c77ab2 (diff) | |
download | ecs-3f284100ba0b709881c4b6ae80c9c3ec4caa4d3d.tar.gz ecs-3f284100ba0b709881c4b6ae80c9c3ec4caa4d3d.zip |
TODO Optimistic database locking
-rw-r--r-- | app/models/message.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/message.rb b/app/models/message.rb index ee267c6..4814adc 100644 --- a/app/models/message.rb +++ b/app/models/message.rb @@ -77,6 +77,7 @@ class Message < ActiveRecord::Base end def update__(request, app_namespace, ressource_name, participant) + # TODO Optimistic database locking raise(Ecs::AuthorizationException, "You are not the original sender of the message.") unless participant.sender?(self) transaction do create_update_helper(request, app_namespace, ressource_name, participant.id) |