From eb342cdbd42af5f028b3111b5fe1c8a5d3ab8990 Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Mon, 9 Dec 2019 20:10:05 +0200 Subject: [PATCH] Do not allow adding new API users outside of registrar details view This feature is not needed. --- app/views/admin/api_users/index.haml | 2 -- config/locales/admin/api_users.en.yml | 1 - config/routes.rb | 2 +- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/app/views/admin/api_users/index.haml b/app/views/admin/api_users/index.haml index 4815607a7..2a20d4c59 100644 --- a/app/views/admin/api_users/index.haml +++ b/app/views/admin/api_users/index.haml @@ -1,5 +1,3 @@ -- content_for :actions do - = link_to(t('.new_btn'), new_admin_api_user_path, class: 'btn btn-primary') = render 'shared/title', name: t('.title') .row diff --git a/config/locales/admin/api_users.en.yml b/config/locales/admin/api_users.en.yml index 89a31f081..de4fddb08 100644 --- a/config/locales/admin/api_users.en.yml +++ b/config/locales/admin/api_users.en.yml @@ -2,7 +2,6 @@ en: admin: api_users: index: - new_btn: New API user title: API users active: Active diff --git a/config/routes.rb b/config/routes.rb index 1e9a6bfc4..29aca2855 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -270,7 +270,7 @@ Rails.application.routes.draw do end resources :admin_users - resources :api_users do + resources :api_users, except: %i[new] do resources :certificates do member do post 'sign'