.. include:: /Includes.rst.txt .. _feature-1793280219: =========================================================== Feature: Grant roles to single people in the Horilla import =========================================================== Description =========== ``roles.yaml`` maps Horilla groups to roles, but some people need a role no group of theirs describes, for example the second person in HR whose group must stay ``employee`` for its other members. They had to be given the role by hand after every fresh import. The file now has an optional section ``people`` that maps a personnel number (the badge id, or the number ``personnel-numbers.csv`` gives) to roles from ``employee``, ``hr`` and ``admin``. They are granted on top of those of the groups, never removing one, when the account is created through ``invite-users`` or the normal invitation. An unknown role stops the import as a broken mapping entry (``people.``). The new stage ``person-roles`` writes nothing and lists every granted role with ``roleGranted``; a personnel number no employee has (``unknownPersonnelNumber``) or several have (``ambiguousPersonnelNumber``) is an error of the row and grants nothing. Impact ====== Only with ``MIGRATION_ENABLED=1`` and a ``people`` section in ``roles.yaml``. Without it nothing changes. A second run grants nothing twice, and a dry run writes nothing. .. index:: Migration, package:adsum-migration