mirror of
https://github.com/internetee/registry.git
synced 2025-08-01 15:34:41 +02:00
Merge branch '113524121-legal_doc_min_size' into staging
This commit is contained in:
commit
60e6001976
3 changed files with 4 additions and 0 deletions
|
@ -5,6 +5,7 @@ class Epp::Contact < Contact
|
||||||
self.inheritance_column = :sti_disabled
|
self.inheritance_column = :sti_disabled
|
||||||
|
|
||||||
before_validation :manage_permissions
|
before_validation :manage_permissions
|
||||||
|
|
||||||
def manage_permissions
|
def manage_permissions
|
||||||
return unless update_prohibited? || delete_prohibited?
|
return unless update_prohibited? || delete_prohibited?
|
||||||
add_epp_error('2304', nil, nil, I18n.t(:object_status_prohibits_operation))
|
add_epp_error('2304', nil, nil, I18n.t(:object_status_prohibits_operation))
|
||||||
|
|
|
@ -6,6 +6,7 @@ class Epp::Domain < Domain
|
||||||
attr_accessor :is_renewal, :is_transfer
|
attr_accessor :is_renewal, :is_transfer
|
||||||
|
|
||||||
before_validation :manage_permissions
|
before_validation :manage_permissions
|
||||||
|
|
||||||
def manage_permissions
|
def manage_permissions
|
||||||
return if is_admin # this bad hack for 109086524, refactor later
|
return if is_admin # this bad hack for 109086524, refactor later
|
||||||
return true if is_transfer || is_renewal
|
return true if is_transfer || is_renewal
|
||||||
|
|
|
@ -9,6 +9,8 @@ class LegalDocument < ActiveRecord::Base
|
||||||
|
|
||||||
belongs_to :documentable, polymorphic: true
|
belongs_to :documentable, polymorphic: true
|
||||||
|
|
||||||
|
validates :body, length: { minimum: (1.37 * 1.4).ceil }
|
||||||
|
|
||||||
before_create :add_creator
|
before_create :add_creator
|
||||||
before_save :save_to_filesystem
|
before_save :save_to_filesystem
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue