mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Introduce API scopes for badges.
This commit is contained in:
@@ -51,6 +51,15 @@ class ApiKeyScope < ActiveRecord::Base
|
||||
},
|
||||
email: {
|
||||
receive_emails: { actions: %w[admin/email#handle_mail] }
|
||||
},
|
||||
badges: {
|
||||
create: { actions: %w[admin/badges#create] },
|
||||
show: { actions: %w[badges#show] },
|
||||
update: { actions: %w[admin/badges#update] },
|
||||
delete: { actions: %w[admin/badges#destroy] },
|
||||
list_user_badges: { actions: %w[user_badges#username], params: %i[username] },
|
||||
assign_badge_to_user: { actions: %w[user_badges#create], params: %i[username] },
|
||||
revoke_badge_from_user: { actions: %w[user_badges#destroy] },
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user