A library's sync state in the admin: the badge, how many files are left, and
the Check now / Pause / Resume controls, shared by the Libraries tab and the
library page. The state itself is Storage.LibraryState.
run/4 does what a button asks; the permission check is the Jobs context's
(jobs.manage and media.manage, against the active role), so a hand-made
event is refused all the same, whoever the buttons were shown to.
Summary
Functions
A flash for a refused run/4.
Check now, Pause or Resume for the library library_uuid, whose current state
is state (LibraryState). {:ok, run} or {:error, reason}.
Attributes
state(:map) - Defaults tonil.uuid(:any) (required)scope(:any) - Defaults tonil.target(:any) (required)