Managing resource requests notifications

From v10+ resource requests notifications to the reponsible administrators can be managed using a metadata field value.

Configuration

/*
Metadata field designated to hold information which the system can use to determine the user group responsible for that 
resource.

Allowed field types are fixed list fields with only a single current value (i.e. drop down list or radio buttons).
To disable it, set to 0 (zero).
*/
$owner_field = 86;

/*
Map the available field options (of the $owner_field) to ResourceSpace user groups. The mappings' keys will hold node IDs and the values user group IDs.
*/
$owner_field_mappings = [
    278 => 3, # Option 1 ==> Super Admin
    280 => 1, # Other ==> Administrators
];

Please note that the system will disable the feature if it's incorrectly configured.

Expected behaviour

When configured, the system will take the list of users that should've been notified and filters it down based on the configured $owner_field for all the requested resources.

This will override any legacy $resource_type_request_emails configuration option that may be set.

The behaviour of configuration option $manage_request_admin or "Auto-assign Managed Requests" plugin should remain unchanged.