Merge branch 'master' of github.com:internetee/registry

This commit is contained in:
Martin Lensment 2014-08-04 15:10:54 +03:00
commit 5bb212ba24
6 changed files with 69 additions and 18 deletions

View file

@ -0,0 +1,15 @@
module Shared::UserStamper
extend ActiveSupport::Concern
def stamp obj
return false if obj.nil? || !obj.has_attribute?( :created_by_id && :updated_by_id )
if obj.new_record?
obj.created_by_id = current_epp_user.id
else
obj.updated_by_id = current_epp_user.id
end
return true
end
end

View file

@ -2,6 +2,7 @@ class Epp::CommandsController < ApplicationController
include Epp::Common
include Epp::DomainsHelper
include Epp::ContactsHelper
include Shared::UserStamper
private
def create