mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 19:20:37 +02:00
Merge pull request #1533 from internetee/1481-add_client_hold_to_registrar_ui
1481 add client hold to registrar ui
This commit is contained in:
commit
3d9e8d2c26
9 changed files with 51 additions and 0 deletions
|
@ -50,6 +50,7 @@ class Ability
|
|||
can(:check, Epp::Domain)
|
||||
can(:create, Epp::Domain)
|
||||
can(:renew, Epp::Domain) { |d| d.registrar_id == @user.registrar_id }
|
||||
can(:remove_hold, Epp::Domain) { |d| d.registrar_id == @user.registrar_id }
|
||||
can(:update, Epp::Domain) { |d, pw| d.registrar_id == @user.registrar_id || d.transfer_code == pw }
|
||||
can(:transfer, Epp::Domain)
|
||||
can(:delete, Epp::Domain) { |d, pw| d.registrar_id == @user.registrar_id || d.transfer_code == pw }
|
||||
|
|
9
app/models/concerns/remove_hold.rb
Normal file
9
app/models/concerns/remove_hold.rb
Normal file
|
@ -0,0 +1,9 @@
|
|||
module RemoveHold
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
def remove_hold(params)
|
||||
xml = epp_xml.update(name: { value: params[:domain_name] },
|
||||
rem: [status: { attrs: { s: 'clientHold' }, value: '' }])
|
||||
current_user.request(xml)
|
||||
end
|
||||
end
|
|
@ -1,6 +1,7 @@
|
|||
module Depp
|
||||
class Domain
|
||||
include ActiveModel::Conversion
|
||||
include RemoveHold
|
||||
extend ActiveModel::Naming
|
||||
|
||||
attr_accessor :name, :current_user, :epp_xml
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue