misc: present self with a "portal-agent" slug in menu.json (#28105)
This commit is contained in:
parent
58f76bcd39
commit
377208ce68
|
@ -485,8 +485,17 @@ def menu_json(request):
|
|||
label = _('Editing "%(site_title)s"') % settings.TEMPLATE_VARS
|
||||
else:
|
||||
label = _('Content Management')
|
||||
|
||||
slug = 'portal'
|
||||
if getattr(settings, 'KNOWN_SERVICES') and 'combo' in settings.KNOWN_SERVICES:
|
||||
# switch to custom slug if the site is the portal agent.
|
||||
for service_slug, service in settings.KNOWN_SERVICES['combo'].items():
|
||||
if service.get('is-portal-agent') and not service.get('secret'):
|
||||
slug = 'portal-agent'
|
||||
break
|
||||
|
||||
json_str = json.dumps([{'label': force_text(label),
|
||||
'slug': 'portal',
|
||||
'slug': slug,
|
||||
'url': request.build_absolute_uri(reverse('combo-manager-homepage'))
|
||||
}])
|
||||
content_type = 'application/json'
|
||||
|
|
Loading…
Reference in New Issue