Add `no_users` check to login http endpoint

Bug #1872868 reported by Caleb Ellis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Alberto Donato
2.7
Fix Released
High
Alberto Donato

Bug Description

Before the UI split, the login template would conditionally display init information if there were currently no MAAS users:
'No admin user has been created yet. Use the "init" administration command to create one.'

The login response used to include `'no_users': UserProfile.objects.all_users().count() == 0` but doesn't anymore. We should add this back so we can add the warning to the template.

This should also be backported to 2.7.

GitHub issue: https://github.com/canonical-web-and-design/maas-ui/issues/969

Tags: blocking-ui ui

Related branches

description: updated
description: updated
Changed in maas:
milestone: none → 2.8.0b1
Alberto Donato (ack)
Changed in maas:
status: New → Triaged
importance: Undecided → High
Alberto Donato (ack)
Changed in maas:
assignee: nobody → Alberto Donato (ack)
Alberto Donato (ack)
Changed in maas:
status: Triaged → In Progress
Changed in maas:
status: In Progress → Fix Committed
Alberto Donato (ack)
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.