mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Merge branch 'master' into registry-569
# Conflicts: # app/controllers/admin/contacts_controller.rb
This commit is contained in:
commit
e4740f3f32
40 changed files with 1287 additions and 1236 deletions
|
@ -1,4 +1,5 @@
|
||||||
class Admin::AccountActivitiesController < AdminController
|
module Admin
|
||||||
|
class AccountActivitiesController < BaseController
|
||||||
load_and_authorize_resource
|
load_and_authorize_resource
|
||||||
before_action :set_default_dates, only: [:index]
|
before_action :set_default_dates, only: [:index]
|
||||||
|
|
||||||
|
@ -57,4 +58,5 @@ class Admin::AccountActivitiesController < AdminController
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::AdminUsersController < AdminController
|
module Admin
|
||||||
|
class AdminUsersController < BaseController
|
||||||
load_and_authorize_resource
|
load_and_authorize_resource
|
||||||
before_action :set_user, only: [:show, :edit, :update, :destroy]
|
before_action :set_user, only: [:show, :edit, :update, :destroy]
|
||||||
|
|
||||||
|
@ -11,9 +12,11 @@ class Admin::AdminUsersController < AdminController
|
||||||
@admin_user = AdminUser.new
|
@admin_user = AdminUser.new
|
||||||
end
|
end
|
||||||
|
|
||||||
def show; end
|
def show;
|
||||||
|
end
|
||||||
|
|
||||||
def edit; end
|
def edit;
|
||||||
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
@admin_user = AdminUser.new(admin_user_params)
|
@admin_user = AdminUser.new(admin_user_params)
|
||||||
|
@ -60,4 +63,5 @@ class Admin::AdminUsersController < AdminController
|
||||||
params.require(:admin_user).permit(:username,
|
params.require(:admin_user).permit(:username,
|
||||||
:password, :password_confirmation, :identity_code, :email, :country_code, { roles: [] })
|
:password, :password_confirmation, :identity_code, :email, :country_code, { roles: [] })
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::ApiUsersController < AdminController
|
module Admin
|
||||||
|
class ApiUsersController < BaseController
|
||||||
load_and_authorize_resource
|
load_and_authorize_resource
|
||||||
before_action :set_api_user, only: [:show, :edit, :update, :destroy]
|
before_action :set_api_user, only: [:show, :edit, :update, :destroy]
|
||||||
|
|
||||||
|
@ -24,9 +25,11 @@ class Admin::ApiUsersController < AdminController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def show; end
|
def show;
|
||||||
|
end
|
||||||
|
|
||||||
def edit; end
|
def edit;
|
||||||
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
params[:api_user].delete(:password) if params[:api_user][:password].blank?
|
params[:api_user].delete(:password) if params[:api_user][:password].blank?
|
||||||
|
@ -60,4 +63,5 @@ class Admin::ApiUsersController < AdminController
|
||||||
:registrar_id, :registrar_typeahead,
|
:registrar_id, :registrar_typeahead,
|
||||||
:identity_code, { roles: [] })
|
:identity_code, { roles: [] })
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::BankStatementsController < AdminController
|
module Admin
|
||||||
|
class BankStatementsController < BaseController
|
||||||
load_and_authorize_resource
|
load_and_authorize_resource
|
||||||
|
|
||||||
before_action :set_bank_statement, only: [:show, :download_import_file, :bind_invoices]
|
before_action :set_bank_statement, only: [:show, :download_import_file, :bind_invoices]
|
||||||
|
@ -84,4 +85,5 @@ class Admin::BankStatementsController < AdminController
|
||||||
:description, :sum, :currency, :reference_no, :paid_at
|
:description, :sum, :currency, :reference_no, :paid_at
|
||||||
])
|
])
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::BankTransactionsController < AdminController
|
module Admin
|
||||||
|
class BankTransactionsController < BaseController
|
||||||
load_and_authorize_resource
|
load_and_authorize_resource
|
||||||
|
|
||||||
def new
|
def new
|
||||||
|
@ -51,4 +52,5 @@ class Admin::BankTransactionsController < AdminController
|
||||||
:buyer_name, :currency, :paid_at
|
:buyer_name, :currency, :paid_at
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
10
app/controllers/admin/base_controller.rb
Normal file
10
app/controllers/admin/base_controller.rb
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
module Admin
|
||||||
|
class BaseController < ApplicationController
|
||||||
|
before_action :authenticate_user!
|
||||||
|
helper_method :head_title_sufix
|
||||||
|
|
||||||
|
def head_title_sufix
|
||||||
|
t(:admin_head_title_sufix)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -1,6 +1,6 @@
|
||||||
module Admin
|
module Admin
|
||||||
module Billing
|
module Billing
|
||||||
class PricesController < AdminController
|
class PricesController < BaseController
|
||||||
authorize_resource(class: 'Billing::Price')
|
authorize_resource(class: 'Billing::Price')
|
||||||
before_action :load_price, only: %i[edit update expire]
|
before_action :load_price, only: %i[edit update expire]
|
||||||
helper_method :zones
|
helper_method :zones
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::BlockedDomainsController < AdminController
|
module Admin
|
||||||
|
class BlockedDomainsController < BaseController
|
||||||
load_and_authorize_resource
|
load_and_authorize_resource
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
@ -52,4 +53,5 @@ class Admin::BlockedDomainsController < AdminController
|
||||||
def set_domain
|
def set_domain
|
||||||
@domain = BlockedDomain.find(params[:id])
|
@domain = BlockedDomain.find(params[:id])
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
|
@ -1,8 +1,10 @@
|
||||||
class Admin::CertificatesController < AdminController
|
module Admin
|
||||||
|
class CertificatesController < BaseController
|
||||||
load_and_authorize_resource
|
load_and_authorize_resource
|
||||||
before_action :set_certificate, :set_api_user, only: [:sign, :show, :download_csr, :download_crt, :revoke, :destroy]
|
before_action :set_certificate, :set_api_user, only: [:sign, :show, :download_csr, :download_crt, :revoke, :destroy]
|
||||||
|
|
||||||
def show; end
|
def show;
|
||||||
|
end
|
||||||
|
|
||||||
def new
|
def new
|
||||||
@api_user = ApiUser.find(params[:api_user_id])
|
@api_user = ApiUser.find(params[:api_user_id])
|
||||||
|
@ -81,4 +83,5 @@ class Admin::CertificatesController < AdminController
|
||||||
{}
|
{}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::ContactVersionsController < AdminController
|
module Admin
|
||||||
|
class ContactVersionsController < BaseController
|
||||||
load_and_authorize_resource
|
load_and_authorize_resource
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
@ -52,5 +53,5 @@ class Admin::ContactVersionsController < AdminController
|
||||||
def create_where_string(key, value)
|
def create_where_string(key, value)
|
||||||
" AND object->>'#{key}' ~* '#{value}'"
|
" AND object->>'#{key}' ~* '#{value}'"
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::ContactsController < AdminController
|
module Admin
|
||||||
|
class ContactsController < BaseController
|
||||||
load_and_authorize_resource
|
load_and_authorize_resource
|
||||||
before_action :set_contact, only: [:show]
|
before_action :set_contact, only: [:show]
|
||||||
helper_method :ident_types
|
helper_method :ident_types
|
||||||
|
@ -83,4 +84,5 @@ class Admin::ContactsController < AdminController
|
||||||
def ident_types
|
def ident_types
|
||||||
Contact::Ident.types
|
Contact::Ident.types
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
class Admin::DashboardsController < AdminController
|
module Admin
|
||||||
|
class DashboardsController < BaseController
|
||||||
authorize_resource class: false
|
authorize_resource class: false
|
||||||
|
|
||||||
def show
|
def show
|
||||||
redirect_to [:admin, :domains] if can? :show, Domain
|
redirect_to [:admin, :domains] if can? :show, Domain
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
class Admin::DelayedJobsController < AdminController
|
module Admin
|
||||||
|
class DelayedJobsController < BaseController
|
||||||
authorize_resource class: false
|
authorize_resource class: false
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@jobs = Delayed::Job.all
|
@jobs = Delayed::Job.all
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
module Admin
|
module Admin
|
||||||
module DNS
|
module DNS
|
||||||
class ZonesController < AdminController
|
class ZonesController < BaseController
|
||||||
authorize_resource(class: 'DNS::Zone')
|
authorize_resource(class: 'DNS::Zone')
|
||||||
before_action :load_zone, only: %i[edit update destroy]
|
before_action :load_zone, only: %i[edit update destroy]
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::DomainVersionsController < AdminController
|
module Admin
|
||||||
|
class DomainVersionsController < BaseController
|
||||||
load_and_authorize_resource
|
load_and_authorize_resource
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
@ -70,6 +71,5 @@ class Admin::DomainVersionsController < AdminController
|
||||||
def create_where_string(key, value)
|
def create_where_string(key, value)
|
||||||
" AND object->>'#{key}' ~* '#{value}'"
|
" AND object->>'#{key}' ~* '#{value}'"
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::DomainsController < AdminController
|
module Admin
|
||||||
|
class DomainsController < BaseController
|
||||||
load_and_authorize_resource
|
load_and_authorize_resource
|
||||||
before_action :set_domain, only: [:show, :edit, :update, :zonefile]
|
before_action :set_domain, only: [:show, :edit, :update, :zonefile]
|
||||||
helper_method :force_delete_templates
|
helper_method :force_delete_templates
|
||||||
|
@ -33,6 +34,7 @@ class Admin::DomainsController < AdminController
|
||||||
|
|
||||||
@domains = @domains.per(params[:results_per_page]) if params[:results_per_page].to_i > 0
|
@domains = @domains.per(params[:results_per_page]) if params[:results_per_page].to_i > 0
|
||||||
end
|
end
|
||||||
|
|
||||||
# rubocop: enable Metrics/PerceivedComplexity
|
# rubocop: enable Metrics/PerceivedComplexity
|
||||||
# rubocop: enable Metrics/CyclomaticComplexity
|
# rubocop: enable Metrics/CyclomaticComplexity
|
||||||
# rubocop: enable Metrics/AbcSize
|
# rubocop: enable Metrics/AbcSize
|
||||||
|
@ -83,7 +85,7 @@ class Admin::DomainsController < AdminController
|
||||||
end
|
end
|
||||||
|
|
||||||
def versions
|
def versions
|
||||||
@domain = Domain.where(id: params[:domain_id]).includes({versions: :item}).first
|
@domain = Domain.where(id: params[:domain_id]).includes({ versions: :item }).first
|
||||||
@versions = @domain.versions
|
@versions = @domain.versions
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -130,4 +132,5 @@ class Admin::DomainsController < AdminController
|
||||||
def force_delete_templates
|
def force_delete_templates
|
||||||
%w(removed_company death)
|
%w(removed_company death)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::EppLogsController < AdminController
|
module Admin
|
||||||
|
class EppLogsController < BaseController
|
||||||
load_and_authorize_resource class: ApiLog::EppLog
|
load_and_authorize_resource class: ApiLog::EppLog
|
||||||
before_action :set_default_dates, only: [:index]
|
before_action :set_default_dates, only: [:index]
|
||||||
|
|
||||||
|
@ -30,4 +31,5 @@ class Admin::EppLogsController < AdminController
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::InvoicesController < AdminController
|
module Admin
|
||||||
|
class InvoicesController < BaseController
|
||||||
load_and_authorize_resource
|
load_and_authorize_resource
|
||||||
|
|
||||||
before_action :set_invoice, only: [:forward, :download_pdf]
|
before_action :set_invoice, only: [:forward, :download_pdf]
|
||||||
|
@ -70,4 +71,5 @@ class Admin::InvoicesController < AdminController
|
||||||
def set_invoice
|
def set_invoice
|
||||||
@invoice = Invoice.find(params[:invoice_id])
|
@invoice = Invoice.find(params[:invoice_id])
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::KeyrelaysController < AdminController
|
module Admin
|
||||||
|
class KeyrelaysController < BaseController
|
||||||
load_and_authorize_resource
|
load_and_authorize_resource
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
@ -6,5 +7,7 @@ class Admin::KeyrelaysController < AdminController
|
||||||
@keyrelays = @q.result.page(params[:page])
|
@keyrelays = @q.result.page(params[:page])
|
||||||
end
|
end
|
||||||
|
|
||||||
def show; end
|
def show;
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::LegalDocumentsController < AdminController
|
module Admin
|
||||||
|
class LegalDocumentsController < BaseController
|
||||||
load_and_authorize_resource
|
load_and_authorize_resource
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
@ -6,4 +7,5 @@ class Admin::LegalDocumentsController < AdminController
|
||||||
filename = @ld.path.split('/').last
|
filename = @ld.path.split('/').last
|
||||||
send_data File.open(@ld.path).read, filename: filename
|
send_data File.open(@ld.path).read, filename: filename
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::MailTemplatesController < AdminController
|
module Admin
|
||||||
|
class MailTemplatesController < BaseController
|
||||||
load_and_authorize_resource
|
load_and_authorize_resource
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
@ -58,4 +59,5 @@ class Admin::MailTemplatesController < AdminController
|
||||||
def mail_template_params
|
def mail_template_params
|
||||||
params.require(:mail_template).permit(:name, :subject, :from, :bcc, :cc, :body, :text_body)
|
params.require(:mail_template).permit(:name, :subject, :from, :bcc, :cc, :body, :text_body)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::PendingDeletesController < AdminController
|
module Admin
|
||||||
|
class PendingDeletesController < BaseController
|
||||||
before_action :find_domain
|
before_action :find_domain
|
||||||
before_action :check_status
|
before_action :check_status
|
||||||
|
|
||||||
|
@ -39,4 +40,5 @@ class Admin::PendingDeletesController < AdminController
|
||||||
def check_status
|
def check_status
|
||||||
return redirect_to admin_domain_path(@domain.id), alert: t(:something_wrong) unless @domain.pending_delete?
|
return redirect_to admin_domain_path(@domain.id), alert: t(:something_wrong) unless @domain.pending_delete?
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::PendingUpdatesController < AdminController
|
module Admin
|
||||||
|
class PendingUpdatesController < BaseController
|
||||||
before_action :find_domain
|
before_action :find_domain
|
||||||
before_action :check_status
|
before_action :check_status
|
||||||
|
|
||||||
|
@ -38,4 +39,5 @@ class Admin::PendingUpdatesController < AdminController
|
||||||
def check_status
|
def check_status
|
||||||
return redirect_to admin_domain_path(@domain.id), alert: t(:something_wrong) unless @domain.pending_update?
|
return redirect_to admin_domain_path(@domain.id), alert: t(:something_wrong) unless @domain.pending_update?
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
class Admin::RegistrarsController < AdminController
|
module Admin
|
||||||
|
class RegistrarsController < BaseController
|
||||||
load_and_authorize_resource
|
load_and_authorize_resource
|
||||||
before_action :set_registrar, only: [:show, :edit, :update, :destroy]
|
before_action :set_registrar, only: [:show, :edit, :update, :destroy]
|
||||||
|
|
||||||
def search
|
def search
|
||||||
render json: Registrar.search_by_query(params[:q])
|
render json: Registrar.search_by_query(params[:q])
|
||||||
end
|
end
|
||||||
|
@ -31,7 +33,8 @@ class Admin::RegistrarsController < AdminController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit; end
|
def edit;
|
||||||
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
if @registrar.update(registrar_params)
|
if @registrar.update(registrar_params)
|
||||||
|
@ -65,4 +68,5 @@ class Admin::RegistrarsController < AdminController
|
||||||
:country_code, :email, :phone, :website, :billing_email, :code, :test_registrar
|
:country_code, :email, :phone, :website, :billing_email, :code, :test_registrar
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::ReppLogsController < AdminController
|
module Admin
|
||||||
|
class ReppLogsController < BaseController
|
||||||
load_and_authorize_resource class: ApiLog::ReppLog
|
load_and_authorize_resource class: ApiLog::ReppLog
|
||||||
before_action :set_default_dates, only: [:index]
|
before_action :set_default_dates, only: [:index]
|
||||||
|
|
||||||
|
@ -31,4 +32,5 @@ class Admin::ReppLogsController < AdminController
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::ReservedDomainsController < AdminController
|
module Admin
|
||||||
|
class ReservedDomainsController < BaseController
|
||||||
load_and_authorize_resource
|
load_and_authorize_resource
|
||||||
before_action :set_domain, only: [:edit, :update]
|
before_action :set_domain, only: [:edit, :update]
|
||||||
|
|
||||||
|
@ -65,4 +66,5 @@ class Admin::ReservedDomainsController < AdminController
|
||||||
def set_domain
|
def set_domain
|
||||||
@domain = ReservedDomain.find(params[:id])
|
@domain = ReservedDomain.find(params[:id])
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::SessionsController < Devise::SessionsController
|
module Admin
|
||||||
|
class SessionsController < Devise::SessionsController
|
||||||
skip_authorization_check only: :create
|
skip_authorization_check only: :create
|
||||||
|
|
||||||
def login
|
def login
|
||||||
|
@ -23,4 +24,5 @@ class Admin::SessionsController < Devise::SessionsController
|
||||||
render 'login'
|
render 'login'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::SettingsController < AdminController
|
module Admin
|
||||||
|
class SettingsController < BaseController
|
||||||
load_and_authorize_resource
|
load_and_authorize_resource
|
||||||
before_action :set_setting_group, only: [:show, :update]
|
before_action :set_setting_group, only: [:show, :update]
|
||||||
|
|
||||||
|
@ -21,7 +22,8 @@ class Admin::SettingsController < AdminController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def show; end
|
def show;
|
||||||
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
if @setting_group.update(setting_group_params)
|
if @setting_group.update(setting_group_params)
|
||||||
|
@ -92,4 +94,5 @@ class Admin::SettingsController < AdminController
|
||||||
|
|
||||||
settings
|
settings
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::WhiteIpsController < AdminController
|
module Admin
|
||||||
|
class WhiteIpsController < BaseController
|
||||||
load_and_authorize_resource
|
load_and_authorize_resource
|
||||||
|
|
||||||
before_action :set_registrar, only: [:new, :show, :edit, :destroy, :update]
|
before_action :set_registrar, only: [:new, :show, :edit, :destroy, :update]
|
||||||
|
@ -7,9 +8,11 @@ class Admin::WhiteIpsController < AdminController
|
||||||
@white_ip = WhiteIp.new(registrar: @registrar)
|
@white_ip = WhiteIp.new(registrar: @registrar)
|
||||||
end
|
end
|
||||||
|
|
||||||
def show; end
|
def show;
|
||||||
|
end
|
||||||
|
|
||||||
def edit; end
|
def edit;
|
||||||
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
if @white_ip.destroy
|
if @white_ip.destroy
|
||||||
|
@ -53,4 +56,5 @@ class Admin::WhiteIpsController < AdminController
|
||||||
def white_ip_params
|
def white_ip_params
|
||||||
params.require(:white_ip).permit(:ipv4, :ipv6, :registrar_id, { interfaces: [] })
|
params.require(:white_ip).permit(:ipv4, :ipv6, :registrar_id, { interfaces: [] })
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
class Admin::ZonefilesController < ApplicationController
|
module Admin
|
||||||
|
class ZonefilesController < BaseController
|
||||||
authorize_resource class: false
|
authorize_resource class: false
|
||||||
# TODO: Refactor this
|
# TODO: Refactor this
|
||||||
|
|
||||||
|
@ -15,4 +16,5 @@ class Admin::ZonefilesController < ApplicationController
|
||||||
redirect_to :back
|
redirect_to :back
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
class AdminController < ApplicationController
|
|
||||||
before_action :authenticate_user!
|
|
||||||
|
|
||||||
helper_method :head_title_sufix
|
|
||||||
def head_title_sufix
|
|
||||||
t(:admin_head_title_sufix)
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,5 +1,6 @@
|
||||||
en:
|
en:
|
||||||
admin:
|
admin:
|
||||||
|
base:
|
||||||
menu:
|
menu:
|
||||||
users: Users
|
users: Users
|
||||||
api_users: API users
|
api_users: API users
|
||||||
|
|
|
@ -52,11 +52,6 @@
|
||||||
<ellipse fill="none" stroke="black" cx="532" cy="-462" rx="87.9851" ry="18"/>
|
<ellipse fill="none" stroke="black" cx="532" cy="-462" rx="87.9851" ry="18"/>
|
||||||
<text text-anchor="middle" x="532" y="-458.3" font-family="Times,serif" font-size="14.00">Epp::ErrorsController</text>
|
<text text-anchor="middle" x="532" y="-458.3" font-family="Times,serif" font-size="14.00">Epp::ErrorsController</text>
|
||||||
</g>
|
</g>
|
||||||
<!-- AdminController -->
|
|
||||||
<g id="node9" class="node"><title>AdminController</title>
|
|
||||||
<ellipse fill="none" stroke="black" cx="-361" cy="66" rx="71.4873" ry="18"/>
|
|
||||||
<text text-anchor="middle" x="-361" y="69.7" font-family="Times,serif" font-size="14.00">AdminController</text>
|
|
||||||
</g>
|
|
||||||
<!-- RegistrarController -->
|
<!-- RegistrarController -->
|
||||||
<g id="node10" class="node"><title>RegistrarController</title>
|
<g id="node10" class="node"><title>RegistrarController</title>
|
||||||
<ellipse fill="none" stroke="black" cx="-173" cy="-462" rx="79.0865" ry="18"/>
|
<ellipse fill="none" stroke="black" cx="-173" cy="-462" rx="79.0865" ry="18"/>
|
||||||
|
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
@ -131,16 +131,6 @@
|
||||||
<polyline fill="none" stroke="black" points="740.5,56 875.5,56 "/>
|
<polyline fill="none" stroke="black" points="740.5,56 875.5,56 "/>
|
||||||
<text text-anchor="start" x="748.5" y="71.2" font-family="Times,serif" font-size="14.00">_layout</text>
|
<text text-anchor="start" x="748.5" y="71.2" font-family="Times,serif" font-size="14.00">_layout</text>
|
||||||
</g>
|
</g>
|
||||||
<!-- AdminController -->
|
|
||||||
<g id="node9" class="node"><title>AdminController</title>
|
|
||||||
<path fill="none" stroke="black" d="M152,239.5C152,239.5 238,239.5 238,239.5 244,239.5 250,233.5 250,227.5 250,227.5 250,158.5 250,158.5 250,152.5 244,146.5 238,146.5 238,146.5 152,146.5 152,146.5 146,146.5 140,152.5 140,158.5 140,158.5 140,227.5 140,227.5 140,233.5 146,239.5 152,239.5"/>
|
|
||||||
<text text-anchor="middle" x="195" y="161.7" font-family="Times,serif" font-size="14.00">AdminController</text>
|
|
||||||
<polyline fill="none" stroke="black" points="140,169.5 250,169.5 "/>
|
|
||||||
<text text-anchor="start" x="148" y="184.7" font-family="Times,serif" font-size="14.00">head_title_sufix</text>
|
|
||||||
<polyline fill="none" stroke="black" points="140,192.5 250,192.5 "/>
|
|
||||||
<polyline fill="none" stroke="black" points="140,216.5 250,216.5 "/>
|
|
||||||
<text text-anchor="start" x="148" y="231.7" font-family="Times,serif" font-size="14.00">_layout</text>
|
|
||||||
</g>
|
|
||||||
<!-- RegistrarController -->
|
<!-- RegistrarController -->
|
||||||
<g id="node10" class="node"><title>RegistrarController</title>
|
<g id="node10" class="node"><title>RegistrarController</title>
|
||||||
<path fill="none" stroke="black" d="M-708,539.5C-708,539.5 -610,539.5 -610,539.5 -604,539.5 -598,533.5 -598,527.5 -598,527.5 -598,428.5 -598,428.5 -598,422.5 -604,416.5 -610,416.5 -610,416.5 -708,416.5 -708,416.5 -714,416.5 -720,422.5 -720,428.5 -720,428.5 -720,527.5 -720,527.5 -720,533.5 -714,539.5 -708,539.5"/>
|
<path fill="none" stroke="black" d="M-708,539.5C-708,539.5 -610,539.5 -610,539.5 -604,539.5 -598,533.5 -598,527.5 -598,527.5 -598,428.5 -598,428.5 -598,422.5 -604,416.5 -610,416.5 -610,416.5 -708,416.5 -708,416.5 -714,416.5 -720,422.5 -720,428.5 -720,428.5 -720,527.5 -720,527.5 -720,533.5 -714,539.5 -708,539.5"/>
|
||||||
|
|
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 68 KiB |
|
@ -17,7 +17,7 @@ RSpec.feature 'New price in admin area', settings: false do
|
||||||
end
|
end
|
||||||
|
|
||||||
def open_list
|
def open_list
|
||||||
click_link_or_button t('admin.menu.prices')
|
click_link_or_button t('admin.base.menu.prices')
|
||||||
end
|
end
|
||||||
|
|
||||||
def open_form
|
def open_form
|
||||||
|
|
|
@ -16,7 +16,7 @@ RSpec.feature 'Editing zone in admin area', settings: false do
|
||||||
end
|
end
|
||||||
|
|
||||||
def open_list
|
def open_list
|
||||||
click_link_or_button t('admin.menu.zones')
|
click_link_or_button t('admin.base.menu.zones')
|
||||||
end
|
end
|
||||||
|
|
||||||
def open_form
|
def open_form
|
||||||
|
|
|
@ -15,7 +15,7 @@ RSpec.feature 'New zone in admin area', settings: false do
|
||||||
end
|
end
|
||||||
|
|
||||||
def open_list
|
def open_list
|
||||||
click_link_or_button t('admin.menu.zones')
|
click_link_or_button t('admin.base.menu.zones')
|
||||||
end
|
end
|
||||||
|
|
||||||
def open_form
|
def open_form
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue