Please add an API to know how many compatible but not authorized yet accounts there are

Bug #1371516 reported by Riccardo Padovani
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Online Accounts setup for Ubuntu Touch
Invalid
Undecided
Unassigned

Bug Description

At the moment with AccountServiceModel.count an app could know how many accounts could be used in the app itself, but it counts only accounts added in Online Account and then authorized to work with the app.

To have a better workflow in apps could be useful to have also a property that says how many accounts of a provider has been added, also if they aren't authorized yet.

E.g:
in reminders app we want to show the button to switch accounts if there are at least 2 accounts, also if one is not authorized yet.
Also, to have two authorized accounts right now the user has to do the authorization from the Online Settings, because with 1 account the app does autologin.

There isn't a good workflow to add another account right now because:
- we want autologin (it's so annoying don't have it)
- we don't want an account button always visible (it's a feature that not many users would use)
- we have no idea if another account has been added in system settings

Revision history for this message
Alberto Mardegan (mardy) wrote :

If you add the "includeDisabled: true" property to the AccountServiceModel, it will also list the disabled accounts.
However, I'm not sure that this would help you a lot, because we don't have an API for applications to say "enable this account", but just "give me a compatible account".

This is by design, see https://wiki.ubuntu.com/OnlineAccounts#App_access ("An app should have no idea whether you have any accounts of a particular type stored in Online Accounts").

So, I'm afraid that unless we change the design, I can't add such an API.

Changed in ubuntu-system-settings-online-accounts:
status: New → Invalid
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.