1
0
Fork 0

API: only show API menu on business sub

Dieser Commit ist enthalten in:
merefield 2021-10-05 10:20:36 +01:00
Ursprung 31e275668c
Commit 1f939c1ca0
3 geänderte Dateien mit 3 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -2,7 +2,7 @@
{{nav-item route="adminWizardsWizard" label="admin.wizard.nav_label"}} {{nav-item route="adminWizardsWizard" label="admin.wizard.nav_label"}}
{{nav-item route="adminWizardsCustomFields" label="admin.wizard.custom_field.nav_label"}} {{nav-item route="adminWizardsCustomFields" label="admin.wizard.custom_field.nav_label"}}
{{nav-item route="adminWizardsSubmissions" label="admin.wizard.submissions.nav_label"}} {{nav-item route="adminWizardsSubmissions" label="admin.wizard.submissions.nav_label"}}
{{#if subscribed}} {{#if api_subscription}}
{{nav-item route="adminWizardsApi" label="admin.wizard.api.nav_label"}} {{nav-item route="adminWizardsApi" label="admin.wizard.api.nav_label"}}
{{/if}} {{/if}}
{{nav-item route="adminWizardsLogs" label="admin.wizard.log.nav_label"}} {{nav-item route="adminWizardsLogs" label="admin.wizard.log.nav_label"}}

Datei anzeigen

@ -15,6 +15,3 @@ plugins:
refresh: true refresh: true
type: list type: list
list_type: compact list_type: compact
wizard_apis_enabled:
client: true
default: false

Datei anzeigen

@ -4,7 +4,8 @@ class CustomWizard::AdminController < ::Admin::AdminController
def index def index
render_json_dump( render_json_dump(
subscribed: CustomWizard::Subscription.subscribed?, #TODO replace with appropriate static?
api_subscription: ["business"].includes?(CustomWizard::Subscription.type),
notices: ActiveModel::ArraySerializer.new( notices: ActiveModel::ArraySerializer.new(
CustomWizard::Notice.list, CustomWizard::Notice.list,
each_serializer: CustomWizard::NoticeSerializer each_serializer: CustomWizard::NoticeSerializer