mirror of
https://github.com/internetee/registry.git
synced 2025-05-19 02:39:37 +02:00
Merge branch '109086523-admin-pending-force-update' into staging
This commit is contained in:
commit
6afed4f0a8
2 changed files with 3 additions and 0 deletions
|
@ -6,6 +6,8 @@ class Admin::PendingUpdatesController < AdminController
|
|||
authorize! :update, :pending
|
||||
|
||||
@epp_domain = Epp::Domain.find(params[:domain_id]) # only epp domain has apply pending
|
||||
@epp_domain.is_admin = true
|
||||
|
||||
if @epp_domain.apply_pending_update!
|
||||
redirect_to admin_domain_path(@domain.id), notice: t(:pending_applied)
|
||||
else
|
||||
|
|
|
@ -4,6 +4,7 @@ class Epp::Domain < Domain
|
|||
|
||||
before_validation :manage_permissions
|
||||
def manage_permissions
|
||||
return if is_admin # this bad hack for 109086524, refactor later
|
||||
return unless update_prohibited? || delete_prohibited?
|
||||
add_epp_error('2304', nil, nil, I18n.t(:object_status_prohibits_operation))
|
||||
false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue