Pending history and admin controls #2557

This commit is contained in:
Priit Tark 2015-08-12 00:13:42 +03:00
parent 6986b7b738
commit 07e4c0cd96
10 changed files with 95 additions and 84 deletions

View file

@ -123,7 +123,8 @@ class Ability
can :manage, WhiteIp
can :read, ApiLog::EppLog
can :read, ApiLog::ReppLog
# can :index, :delayed_job
can :update, :pending
can :destroy, :pending
can :create, :zonefile
can :access, :settings_menu
end

View file

@ -367,6 +367,8 @@ class Domain < ActiveRecord::Base
self.pending_json = {}
statuses.delete(DomainStatus::PENDING_UPDATE)
statuses.delete(DomainStatus::PENDING_DELETE)
status_notes[DomainStatus::PENDING_UPDATE] = ''
status_notes[DomainStatus::PENDING_DELETE] = ''
save
end

View file

@ -433,9 +433,10 @@ class Epp::Domain < Domain
return unless update(frame, user, false)
clean_pendings!
self.deliver_emails = true # turn on email delivery for epp
self.deliver_emails = true # turn on email delivery
DomainMailer.registrant_updated_notification_for_new_registrant(self).deliver_now
old_registrant_email.deliver_now
true
end
def apply_pending_delete!
@ -446,6 +447,7 @@ class Epp::Domain < Domain
DomainMailer.delete_confirmation(self).deliver_now
clean_pendings! if epp_destroy(frame, user, false)
true
end
def attach_legal_document(legal_document_data)