From 607f700c8cc255d579b05915d5aa7cb9fcfdb818 Mon Sep 17 00:00:00 2001 From: KThompson-Lane-Unity <142420603+KThompson-Lane-Unity@users.noreply.github.com> Date: Tue, 3 Oct 2023 09:20:17 +0100 Subject: [PATCH] FEATURE: Add API key scopes for tag_groups (#23634) --- app/models/api_key_scope.rb | 16 ++++++++++++++++ config/locales/client.en.yml | 5 +++++ spec/requests/admin/api_controller_spec.rb | 1 + 3 files changed, 22 insertions(+) diff --git a/app/models/api_key_scope.rb b/app/models/api_key_scope.rb index ff4f455ac1e..857b250bfd7 100644 --- a/app/models/api_key_scope.rb +++ b/app/models/api_key_scope.rb @@ -70,6 +70,22 @@ class ApiKeyScope < ActiveRecord::Base actions: %w[tags#index], }, }, + tag_groups: { + list: { + actions: %w[tag_groups#index], + }, + show: { + actions: %w[tag_groups#show], + params: %i[id], + }, + create: { + actions: %w[tag_groups#create], + }, + update: { + actions: %w[tag_groups#update], + params: %i[id], + }, + }, categories: { list: { actions: %w[categories#index], diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 9f211db2de4..a65b5da7f9c 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -4856,6 +4856,11 @@ en: list: List latest posts and private posts. RSS is also supported. tags: list: List tags. + tag_groups: + list: Get a list of tag groups. + show: Get a single tag group by id. + create: Creates a tag group. + update: Updates a tag group specified by id. categories: list: Get a list of categories. show: Get a single category by id. diff --git a/spec/requests/admin/api_controller_spec.rb b/spec/requests/admin/api_controller_spec.rb index b582558fce9..4c0f75d81c1 100644 --- a/spec/requests/admin/api_controller_spec.rb +++ b/spec/requests/admin/api_controller_spec.rb @@ -430,6 +430,7 @@ RSpec.describe Admin::ApiController do "email", "posts", "tags", + "tag_groups", "uploads", "user_status", "global",