mirror of
https://github.com/internetee/registry.git
synced 2025-07-20 01:36:02 +02:00
Fix permission check #2623
This commit is contained in:
parent
9067d0048c
commit
6a758a9d91
2 changed files with 3 additions and 4 deletions
|
@ -574,7 +574,7 @@ class Domain < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def pending_update?
|
||||
statuses.include?(DomainStatus::PENDING_UPDATE) && !statuses.include?(DomainStatus::FORCE_UPDATE)
|
||||
statuses.include?(DomainStatus::PENDING_UPDATE) && !statuses.include?(DomainStatus::FORCE_DELETE)
|
||||
end
|
||||
|
||||
# public api
|
||||
|
|
|
@ -4,8 +4,7 @@ class Epp::Domain < Domain
|
|||
|
||||
before_validation :manage_permissions
|
||||
def manage_permissions
|
||||
return unless update_prohibited?
|
||||
return unless delete_prohibited?
|
||||
return unless update_prohibited? || delete_prohibited?
|
||||
add_epp_error('2304', nil, nil, I18n.t(:object_status_prohibits_operation))
|
||||
false
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue