FEATURE: Add API scopes for group endpoints (#20401)
Added two new api scopes for managing and administering groups. See https://meta.discourse.org/t/249710
This commit is contained in:
parent
8d2fa1c184
commit
51a7cd899e
|
@ -158,6 +158,21 @@ class ApiKeyScope < ActiveRecord::Base
|
|||
actions: %w[user_badges#destroy],
|
||||
},
|
||||
},
|
||||
groups: {
|
||||
manage_groups: {
|
||||
actions: %w[groups#members groups#add_members groups#remove_members],
|
||||
params: %i[id],
|
||||
},
|
||||
administer_groups: {
|
||||
actions: %w[
|
||||
admin/groups#create
|
||||
admin/groups#destroy
|
||||
groups#show
|
||||
groups#update
|
||||
groups#index
|
||||
],
|
||||
},
|
||||
},
|
||||
search: {
|
||||
show: {
|
||||
actions: %w[search#show],
|
||||
|
|
|
@ -4736,6 +4736,9 @@ en:
|
|||
list_user_badges: List user badges.
|
||||
assign_badge_to_user: Assign a badge to a user.
|
||||
revoke_badge_from_user: Revoke a badge from a user.
|
||||
groups:
|
||||
manage_groups: List, add, and remove group members.
|
||||
administer_groups: List, show, create, update, and delete groups.
|
||||
search:
|
||||
show: Search using the `/search.json?q=term` endpoint.
|
||||
query: Search using the `/search/query?term=term` endpoint.
|
||||
|
|
|
@ -427,6 +427,7 @@ RSpec.describe Admin::ApiController do
|
|||
"user_status",
|
||||
"global",
|
||||
"badges",
|
||||
"groups",
|
||||
"categories",
|
||||
"search",
|
||||
"invites",
|
||||
|
|
Loading…
Reference in New Issue