refactor(library): ask permissions instead of the rights number
Fourteen comparisons against users.rights become one permission: library.moderate, held by
the library moderator, the super moderator and the administrator. 'rights > 4' meant that
and nothing else — creating and editing sections, editing and deleting articles, deleting
their images, the pre-moderation queue, and reading an article that has not been published
yet.
The one check that was not about the library asks the core permission it belongs to: an
article rendered the smilies kept for the staff for anybody with a number above zero, and
now for whoever holds system.smilies.admin.
The provider is registered by hand in the module's services file: this module does not
load its Services directory as a whole, and a provider nobody instantiates declares
nothing.
What is left in the module for later: the mod_lib config, which moves when the config keys
become permissions of the guest and the user roles.
An installation that has already run auth:apply-default-permissions needs it once more
with --force.
the library moderator, the super moderator and the administrator. 'rights > 4' meant that
and nothing else — creating and editing sections, editing and deleting articles, deleting
their images, the pre-moderation queue, and reading an article that has not been published
yet.
The one check that was not about the library asks the core permission it belongs to: an
article rendered the smilies kept for the staff for anybody with a number above zero, and
now for whoever holds system.smilies.admin.
The provider is registered by hand in the module's services file: this module does not
load its Services directory as a whole, and a provider nobody instantiates declares
nothing.
What is left in the module for later: the mod_lib config, which moves when the config keys
become permissions of the guest and the user roles.
An installation that has already run auth:apply-default-permissions needs it once more
with --force.