GNOME Bugzilla – Bug 737721
Allow account ID to be provided for new accounts
Last modified: 2014-10-08 17:03:30 UTC
Fleet Commander's GOA integration will need to use the AddAccount method to deploy accounts configured by an administrator. Along with the new IsLocked property described in bug 737656, I'd also like to supply my own account Id by way of the 'details' dictionary parameter. This would make it easier to keep deployed accounts synchronized with profile data published on the server side.
Created attachment 287518 [details] [review] Untested patch Not quite far enough on the Fleet Commander side to test this yet, but I think it should work. As noted in the patch, it could be a tad cleaner once GOA requires GLib 2.40 and can use g_variant_dict_remove(). Not sure this is worth bumping the requirement over though.
(In reply to comment #1) > As noted in the patch, it could be a tad cleaner once GOA requires GLib 2.40 > and can use g_variant_dict_remove(). Not sure this is worth bumping the > requirement over though. Having learned a bit more about GVariantDict, I don't think it will work well for this case after all. GVariantDict operates on "a{sv}" dictionaries, whereas the details dictionary is "a{ss}". Best discard my "XXX" comment in the patch before committing.
Review of attachment 287518 [details] [review]: Looks good. Thanks for the patch. ::: src/daemon/goadaemon.c @@ +828,3 @@ + { + /* XXX Use g_variant_dict_remove() here once we require GLib 2.40. + * Then we can remove the check for Id in the loop below. */ Yeah, as you said, g_variant_dict_remove won't be appropriate here.
Created attachment 288056 [details] [review] daemon: Allow account ID to be provided for new accounts I added the bug number to the commit message, and removed the comment about g_variant_dict_remove.
Thanks!