After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 771366 - Support account templates
Support account templates
Status: RESOLVED OBSOLETE
Product: gnome-online-accounts
Classification: Core
Component: general
unspecified
Other All
: Normal enhancement
: ---
Assigned To: GNOME Online Accounts maintainer(s)
GNOME Online Accounts maintainer(s)
: 675749 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-09-13 15:20 UTC by Debarshi Ray
Modified: 2021-07-05 10:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build: Add --with-template-file (1.47 KB, patch)
2016-09-14 16:55 UTC, Debarshi Ray
committed Details | Review
utils: Add goa_utils_keyfile_copy_group (4.08 KB, patch)
2016-09-14 16:55 UTC, Debarshi Ray
committed Details | Review
daemon: Use a instance variable for the main user configuration file (6.48 KB, patch)
2016-09-14 16:56 UTC, Debarshi Ray
committed Details | Review
daemon: Use the instance variable to construct the parent's path (1.55 KB, patch)
2016-09-14 16:56 UTC, Debarshi Ray
committed Details | Review
daemon: Remove unused instance variables (1.52 KB, patch)
2016-09-14 16:57 UTC, Debarshi Ray
committed Details | Review
daemon: Rename some utility functions (2.73 KB, patch)
2016-09-14 16:57 UTC, Debarshi Ray
committed Details | Review
utils: Add goa_utils_keyfile_get_boolean (2.36 KB, patch)
2016-09-14 16:58 UTC, Debarshi Ray
committed Details | Review
daemon: Add support for account templates (11.36 KB, patch)
2016-09-14 16:59 UTC, Debarshi Ray
committed Details | Review
owncloud: Rename a variable (1.77 KB, patch)
2016-09-14 16:59 UTC, Debarshi Ray
committed Details | Review
owncloud: Add an is_template parameter to create_account_details_ui (2.52 KB, patch)
2016-09-14 17:00 UTC, Debarshi Ray
committed Details | Review
owncloud: Support converting a template to full-fledged account (5.39 KB, patch)
2016-09-14 17:00 UTC, Debarshi Ray
committed Details | Review

Description Debarshi Ray 2016-09-13 15:20:19 UTC
Configuration and deployment tools like Fleet Commander [1] want to pre-configure online accounts by placing skeletons representing an account. These skeletons will look like the usual key file entry representing an online account, but might not have all the fields that an account usually has. For example, it might specify the provider, but not the username (ie. GoaAccount:identity) used for authentication.

[1] https://github.com/fleet-commander
Comment 1 Debarshi Ray 2016-09-14 16:55:24 UTC
Created attachment 335547 [details] [review]
build: Add --with-template-file
Comment 2 Debarshi Ray 2016-09-14 16:55:53 UTC
Created attachment 335548 [details] [review]
utils: Add goa_utils_keyfile_copy_group
Comment 3 Debarshi Ray 2016-09-14 16:56:25 UTC
Created attachment 335549 [details] [review]
daemon: Use a instance variable for the main user configuration file
Comment 4 Debarshi Ray 2016-09-14 16:56:56 UTC
Created attachment 335551 [details] [review]
daemon: Use the instance variable to construct the parent's path
Comment 5 Debarshi Ray 2016-09-14 16:57:20 UTC
Created attachment 335552 [details] [review]
daemon: Remove unused instance variables
Comment 6 Debarshi Ray 2016-09-14 16:57:53 UTC
Created attachment 335553 [details] [review]
daemon: Rename some utility functions
Comment 7 Debarshi Ray 2016-09-14 16:58:52 UTC
Created attachment 335554 [details] [review]
utils: Add goa_utils_keyfile_get_boolean
Comment 8 Debarshi Ray 2016-09-14 16:59:20 UTC
Created attachment 335555 [details] [review]
daemon: Add support for account templates
Comment 9 Debarshi Ray 2016-09-14 16:59:46 UTC
Created attachment 335556 [details] [review]
owncloud: Rename a variable
Comment 10 Debarshi Ray 2016-09-14 17:00:20 UTC
Created attachment 335557 [details] [review]
owncloud: Add an is_template parameter to create_account_details_ui
Comment 11 Debarshi Ray 2016-09-14 17:00:45 UTC
Created attachment 335558 [details] [review]
owncloud: Support converting a template to full-fledged account
Comment 12 Debarshi Ray 2016-09-14 17:30:01 UTC
With these patches, if g-o-a is built with --with-template=file=/some/file, and the following snippet is added to /some/file, then it will automatically pre-configure an ownCloud account:

[Template account_fc_12345678]
Provider=owncloud
CalendarEnabled=true
ContactsEnabled=true
DocumentsEnabled=true
FilesEnabled=true
Uri=https://cloud.gnome.org/
AcceptSslErrors=false

The account will be marked as attention-needed in gnome-control-center because the Identity is missing. If 'sign in', then you will be asked for your username and password and it will turn into a working account. Once it is working, the account will always be cached, so the absence of the above snippet won't remove the account. This is meant to ensure that pre-configured corporate accounts are not lost outside the corporate network.

In case, the account really needs to be removed then the following line needs to be added to the snippet:
ForceRemove=true

If you look closely, you will notice that the Uri field is not output by the introspection tool that we added for GoaProviders in bug 767914. We need to fix that.

So far, the UI to convert templates to accounts only work for ownCloud accounts. Since the UI code varies from one GoaProvider to another, we will have to go through them one by one. ownCloud is relatively simple and hence a good starting point.
Comment 13 Debarshi Ray 2016-09-14 18:25:33 UTC
Keeping this open for the template-to-account UI for providers other than ownCloud.
Comment 14 Debarshi Ray 2017-05-29 17:14:19 UTC
*** Bug 675749 has been marked as a duplicate of this bug. ***
Comment 15 GNOME Infrastructure Team 2021-07-05 10:58:39 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/gnome-online-accounts/-/issues/

Thank you for your understanding and your help.