fix: Allow integration apps to be listed by an agent (#6587)
* fix: Allow integration apps to be listed by an agent * Fix rubocop
This commit is contained in:
@@ -1,9 +1,14 @@
|
||||
json.call(resource.params, *resource.params.keys)
|
||||
json.id resource.id
|
||||
json.name resource.name
|
||||
json.description resource.description
|
||||
json.enabled resource.enabled?(@current_account)
|
||||
json.action resource.action
|
||||
json.button resource.action
|
||||
|
||||
if Current.account_user&.administrator?
|
||||
json.call(resource.params, *resource.params.keys)
|
||||
json.action resource.action
|
||||
json.button resource.action
|
||||
end
|
||||
|
||||
json.hooks do
|
||||
json.array! @current_account.hooks.where(app_id: resource.id) do |hook|
|
||||
json.partial! 'api/v1/models/hook', formats: [:json], resource: hook
|
||||
|
||||
@@ -4,4 +4,5 @@ json.status resource.enabled?
|
||||
json.inbox resource.inbox&.slice(:id, :name)
|
||||
json.account_id resource.account_id
|
||||
json.hook_type resource.hook_type
|
||||
json.settings resource.settings
|
||||
|
||||
json.settings resource.settings if Current.account_user&.administrator?
|
||||
|
||||
Reference in New Issue
Block a user