mirror of
https://github.com/internetee/registry.git
synced 2025-07-31 23:16:23 +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
|
||||
|
||||
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))
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue