Merge branch '113524121-legal_doc_min_size' into staging

This commit is contained in:
Stas 2016-02-29 11:31:48 +02:00
commit 60e6001976
3 changed files with 4 additions and 0 deletions

View file

@ -5,6 +5,7 @@ class Epp::Contact < Contact
self.inheritance_column = :sti_disabled
before_validation :manage_permissions
def manage_permissions
return unless update_prohibited? || delete_prohibited?
add_epp_error('2304', nil, nil, I18n.t(:object_status_prohibits_operation))

View file

@ -6,6 +6,7 @@ class Epp::Domain < Domain
attr_accessor :is_renewal, :is_transfer
before_validation :manage_permissions
def manage_permissions
return if is_admin # this bad hack for 109086524, refactor later
return true if is_transfer || is_renewal

View file

@ -9,6 +9,8 @@ class LegalDocument < ActiveRecord::Base
belongs_to :documentable, polymorphic: true
validates :body, length: { minimum: (1.37 * 1.4).ceil }
before_create :add_creator
before_save :save_to_filesystem