It's possible to add more than one U1 account from system settings on the phone

Bug #1234282 reported by Leo Arias
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Online Accounts setup for Ubuntu Touch
Fix Released
High
Alberto Mardegan
ubuntuone-credentials
Fix Released
Undecided
Alberto Mardegan
accounts-qml-module (Ubuntu)
Fix Released
Undecided
Unassigned
libaccounts-glib (Ubuntu)
Fix Released
Undecided
Unassigned
libaccounts-qt (Ubuntu)
Fix Released
Undecided
Unassigned
ubuntu-system-settings-online-accounts (Ubuntu)
Fix Released
Undecided
Unassigned
ubuntuone-credentials (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

SRU information:

[Impact] Accidental creation of multiple UbuntuOne accounts can compromise the functionality of U1 (whose stack does not support multiple accounts).
The fix consists in disabling (greying out) the "Ubuntu One" item when an account for it already exists.

[Test Case] With these steps it's possible to create two U1 accounts:
Open **System Settings**.
Go to **Accounts**.
On the **Add Account** section, select **Ubuntu One**.
Enter the email address.
Enter the password.
Click **Continue**.
The **Accounts** screen is shown.
Click **Add account...**
Select **Ubuntu One**.
Enter the email address.
Enter the password.
Click **Continue**.

[Regression Potential] Several packages are involved in this bugfix:
- ubuntuone-credentials: the only changes done here is the addition of a
  "<single-account>true</single-account>" line in the ubuntuone.provider XML file.
  This cannot cause any regression (and older versions of libaccounts-glib simply
  ignore any unrecognized elements).

- libaccounts-glib: added a new API to return the value of the <single-account>
  element; also here there's no risk of regression, as applications now using this
  new API are unaffected. Besides, unit tests have been added to cover this API.

- libaccounts-qt: this is just a thin wrapper around libaccounts-glib. So the same
  API was added here, with unit tests. Other code paths are unaffected by this
  change.

- accounts-qml-module: this is a wrapper for libaccounts-qt, to provide a QML API.
  The value of the <single-account> element has been added as a role in the
  ProvidersModel class. Again, this doesn't affect the existing functionality, is
  well covered with unit tests and moreover at the current stage the ProvidersModel
  class is known to be used only by the ubuntu-system-settings-online-accounts
  project.

- ubuntu-system-settings-online-accounts: support for reading the <single-account> value
  (via accounts-qml-module) and if that is true, then check if there are already some
  accounts created for the given provider. The code changes consists in about 10 lines
  of code, and all but one are only triggered if the <single-account> flag is true
  (which happens for the U1 provider only). The code has been tested and works.

=====================
Original description:

Open **System Settings**.
Go to **Accounts**.
On the **Add Account** section, select **Ubuntu One**.
Enter the email address.
Enter the password.
Click **Continue**.

The **Accounts** screen is shown.
Click **Add account...**
Select **Ubuntu One**.
Enter the email address.
Enter the password.
Click **Continue**.

After adding the first U1 account, the second time you click Add account, U1 should not be available as an option.

See the attached screenshot.

Tags: qa-touch u1

Related branches

Revision history for this message
Leo Arias (elopio) wrote :
Leo Arias (elopio)
Changed in ubuntuone-credentials:
assignee: nobody → Mike McCracken (mikemc)
Revision history for this message
Mike McCracken (mikemc) wrote :

The ubuntu one account should be restricted to having one such account on the system at a time.
UOA currently doesn't support this, and allows the user to create multiples.

Ideally, UOA would allow a provider to just specify that it should be a singleton in the .provider file or similar, so that provider code doesn't need to check this.

affects: ubuntuone-credentials → ubuntu-system-settings-online-accounts
Changed in ubuntu-system-settings-online-accounts:
assignee: Mike McCracken (mikemc) → Alberto Mardegan (mardy)
Alberto Mardegan (mardy)
Changed in ubuntuone-credentials:
assignee: nobody → Alberto Mardegan (mardy)
status: New → In Progress
Alberto Mardegan (mardy)
Changed in ubuntu-system-settings-online-accounts:
status: Confirmed → In Progress
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:ubuntu-system-settings-online-accounts at revision 70, scheduled for release in ubuntu-system-settings-online-accounts, milestone Unknown

Changed in ubuntu-system-settings-online-accounts:
status: In Progress → Fix Committed
Alberto Mardegan (mardy)
description: updated
Changed in ubuntuone-credentials:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-system-settings-online-accounts - 0.2~+13.10.20131016-0ubuntu1

---------------
ubuntu-system-settings-online-accounts (0.2~+13.10.20131016-0ubuntu1) saucy; urgency=low

  [ Alberto Mardegan ]
  * Fix OAuth authentication with parameters Fix an obvious JS error. .
    (LP: #1240513)
  * Enforce single-account for providers who require it . (LP: #1234282)

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 70
 -- Ubuntu daily release <email address hidden> Wed, 16 Oct 2013 14:02:41 +0000

Changed in ubuntu-system-settings-online-accounts (Ubuntu):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntuone-credentials - 13.10-0ubuntu3

---------------
ubuntuone-credentials (13.10-0ubuntu3) saucy-proposed; urgency=low

  * debian/patches/02_lp1234282.patch
    - Don't allow adding multiple U1 accounts (LP: #1234282)
 -- Ken VanDine <email address hidden> Wed, 16 Oct 2013 10:36:15 -0400

Changed in ubuntuone-credentials (Ubuntu):
status: New → Fix Released
Leo Arias (elopio)
tags: added: u1
Changed in libaccounts-glib (Ubuntu):
status: New → Fix Released
Changed in accounts-qml-module (Ubuntu):
status: New → Fix Released
Changed in libaccounts-qt (Ubuntu):
status: New → Fix Released
Changed in ubuntuone-credentials:
status: Fix Committed → Fix Released
Changed in ubuntu-system-settings-online-accounts:
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.