Shouldn't services_auth_invoke return NULL id no access function found?

nicholasThompson - November 9, 2009 - 00:23
Project:Services
Version:6.x-2.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

I have noticed that if there is no authentication system setup, the default action for services_auth_invoke is to return TRUE.

this makes logical sense if other functions calling this expect a more "is this allowed? TRUE/FALSE" kind of setup (such as user_access()) - however in this case it appears that the result is expected to be an array of a service failure error if there authentication is a problem. Returning TRUE confuses things as you end up with "#data => 1, #error => 1"...

Setting the default return to NULL seems to fix this... Is this intentional or have I missed something?

 
 

Drupal is a registered trademark of Dries Buytaert.