Add additional restrictions on updating deleted pools

This commit is contained in:
BrokenEagle
2017-11-20 19:30:35 -08:00
parent 5f39a8b4b2
commit 956bd707a5
2 changed files with 13 additions and 0 deletions

View File

@@ -10,6 +10,9 @@ class PoolsController < ApplicationController
def edit
@pool = Pool.find(params[:id])
if @pool.is_deleted && !@pool.deletable_by?(CurrentUser.user)
raise User::PrivilegeError
end
respond_with(@pool)
end