GNOME Bugzilla – Bug 771366
Support account templates
Last modified: 2021-07-05 10:58:39 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
Created attachment 335547 [details] [review] build: Add --with-template-file
Created attachment 335548 [details] [review] utils: Add goa_utils_keyfile_copy_group
Created attachment 335549 [details] [review] daemon: Use a instance variable for the main user configuration file
Created attachment 335551 [details] [review] daemon: Use the instance variable to construct the parent's path
Created attachment 335552 [details] [review] daemon: Remove unused instance variables
Created attachment 335553 [details] [review] daemon: Rename some utility functions
Created attachment 335554 [details] [review] utils: Add goa_utils_keyfile_get_boolean
Created attachment 335555 [details] [review] daemon: Add support for account templates
Created attachment 335556 [details] [review] owncloud: Rename a variable
Created attachment 335557 [details] [review] owncloud: Add an is_template parameter to create_account_details_ui
Created attachment 335558 [details] [review] owncloud: Support converting a template to full-fledged account
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.
Keeping this open for the template-to-account UI for providers other than ownCloud.
*** Bug 675749 has been marked as a duplicate of this bug. ***
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.