Closed (fixed)
Project:
Services
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
27 Mar 2017 at 21:19 UTC
Updated:
11 Apr 2017 at 16:35 UTC
Jump to comment: Most recent
Comments
Comment #2
tyler.frankenstein commentedUse this hook to modify the resource and then you can declare your own custom access callback, which could piggy back off of the original access callback: http://cgit.drupalcode.org/services/tree/docs/services.alter.api.php?h=7...
Comment #3
kylebrowning commentedYou can checkout this file, services.alter.api.php
Which conains this hook,
That will let you change the hook access to a function you write yourself.
Hope this helps!
Comment #4
kylebrowning commentedDoh, Tyler beat me to it!
Comment #5
monstrfolk commentedThanks for the information.
You guys are quick with help. Very nice.
Comment #6
kylebrowning commentedNo problem! Let us know if you have any other questions.
Comment #7
monstrfolk commentedThere is a lot of extra stuff happening in the original access callback.
I think that creating a hook in the access check would be a good idea. That way modules wanting to extend access do not have to worry about ensuring the data is properly formatted.
Thoughts?
Comment #8
monstrfolk commentedTo explain further...what I would like is the following.
Comment #9
monstrfolk commentedAnother idea is to move the data format checking into a helper function that could be called from an extended module. I think that might work better than a hook.