mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 17:01:44 +02:00
Merge branch 'master' of github.com:internetee/registry
This commit is contained in:
commit
5bb212ba24
6 changed files with 69 additions and 18 deletions
15
app/controllers/concerns/shared/user_stamper.rb
Normal file
15
app/controllers/concerns/shared/user_stamper.rb
Normal 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
|
|
@ -2,6 +2,7 @@ class Epp::CommandsController < ApplicationController
|
|||
include Epp::Common
|
||||
include Epp::DomainsHelper
|
||||
include Epp::ContactsHelper
|
||||
include Shared::UserStamper
|
||||
|
||||
private
|
||||
def create
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue