Add SetProperties D-Bus method to set multiple properties in a single call
If a vendor extension has multiple properties, they currently have to be set individually using one org.freedesktop.DBus.Properties.Set
call each. This adds up to a lot of D-Bus calls, doesn’t allow for atomic updates wrt other observers on the bus, and means the vendor extension key file gets written out a lot.
It would be better if there was an org.freedesktop.Accounts.User.SetProperties
method which allowed multiple properties from multiple interfaces to be set in a single call. It would have a signature something like:
void SetProperties (a{sa{sv}} properties)
properties
is a map of interface name → (a map of property name → value).
I suggest that it does all its permissions checks first, and returns without changing the user’s state if the caller doesn’t have permission to change one or more of the properties.
I don’t see any reason why this method shouldn’t be allowed to change properties on org.freedesktop.Accounts.User
itself; but if there is a reason that would be a bad idea, then it could easily be limited to changing vendor extension properties only.