Closed (won't fix)
Project:
Services
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Mar 2013 at 14:18 UTC
Updated:
29 Mar 2013 at 15:36 UTC
In _services_build_resources(), I notice that the settings for disabling individual services are applied prior to the alter hook:
// Load the endpoint
$endpoint = NULL;
if (!empty($endpoint_name)) {
$endpoint = services_endpoint_load($endpoint_name);
// Apply the endpoint on the services
_services_apply_endpoint($resources, $endpoint, TRUE); //<--- services disabled here
}
drupal_alter('services_resources', $resources, $endpoint); // <--- you added something else after
If someone ended up adding a service via the alter hook, rather than the base hook, it would be unintentionally exposed although appearing to be disabled from the admin screen.
Granted, the new service should have been added in the base hook, not the alter hook, so the fault really lies with the person making this new service. However, I think a fix for this would be simple, so it doesn't hurt to cover for this possibility.
Comments
Comment #1
marcingy commentedAlter hooks are not for adding services