class Lato::OperationsController

def validate_user_access_to_operation

def validate_user_access_to_operation
  return true if @operation.lato_user_id == @session.user_id
  respond_to do |format|
    format.html { redirect_to lato.root_path }
    format.json { render plain: '', status: :unauthorized }
  end
  false
end