This commit adds a comment to ssh keys writen to ~/.authorized_keys
that come from the store. This will enable us in the future to
update keys that come from the store because we now have the
information what keys got added by snapd and which were added by
other means.
this helps avoiding passing *Command around which complicates exposing
helpers if they actually want to be tested
with this we don't need to export ThemesCmd to the tests anymore
the option if set to false disables automatic user creation on assertion
auto-import
it is processed early which means its setting available
before snapd starts serving users API requests
The snap auto-import code right will always try to create all
known system-users when it imports any assertions. However this
leads to systemd errors and a degraded boot when a device is already
managed and a removable device with a user assertion is attached
to the device.
This commit changes the auto-import code to send a new
`automatic: true` json when running auto-imports. With that
option already managed device just return that no users are
created and no error.
This fixes https://bugs.launchpad.net/newparis/+bug/1893331
This will allow to hand out system-user assertions limited to a
limited set of serial assertions.
Implements the spec in https://forum.snapcraft.io/t/18163
Currently we output on classic:
```
$ sudo snap remove-user foo
error: system user administration via snapd is not allowed on this
system%!(EXTRA string=POST)
```
This commit fixes this.
/v2/logout was added in e35c869d, but doesn't have allow Polkit access like
/v2/login does. This change gives it the same access as a client that is
allowed to login should also be allowed to logout.