Closed (fixed)
Project:
Universally Unique IDentifier
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Mar 2012 at 01:20 UTC
Updated:
8 Jul 2014 at 20:50 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
aspilicious commentedHmmm: http://drupalcontrib.org/api/drupal/contributions!entity!entity.module/f...
I don't think hacking away file is a good generic plan. If it returns NULL it means there is no access information available so we just should return true. Entity module (or core or whatever module that is responsible) should add a callback for files.
Or am I missing something?
Comment #2
aspilicious commentedAnd a patch, that implements #1
Comment #4
aspilicious commentedThat test always fails... even without this patch.
Comment #5
recidive commented@aspilicious: we need to add a check to see if $return is !== FALSE, or we are just giving access to everyone for everything.
Something like that:
or check for === NULL
Comment #6
aspilicious commentedYou're totaly correct!
Comment #7
aspilicious commentedComment #9
aspilicious commentedStupid tests, nothing to do with this patch
Comment #10
dixon_Hmm, I have my doubts here.
What if a module implements an access callback, and the access callback might be constructed in a way that it only returns
TRUEwhen access is to be given and nothing (NULL) in all other cases.NULLin that case would mean access denied, but here we will let this through.Maybe we should do something similar to what
entity_accessis doing -- fetch the entity info, check if we have'access callback'. If we don't, always returnTRUE. But if we do have an access callback return what that callback is giving us.Comment #11
recidive commented@dixon_ in the long run your solution looks the more appropriate.
Comment #12
dixon_I rolled and committed a patch with my logic explained in #10. I also took the opportunity to wrap more code in the
try {}statement to catch potential errors in other parts of the access callback.http://drupalcode.org/project/uuid.git/commit/22c3ae3f24e19ad411f14cb08b...
Thanks
Comment #14
dillix commentedThere is a mistake in uuid_services.module:
Should be:
Comment #15
carlhinton commentedHere's a patch to implement #14
Comment #16
carlhinton commentedComment #17
dillix commented+1 for RTBC
Comment #19
dkingofpa commented@dillix, @CarlHinton Please don't re-open a Closed (fixed) issue. Instead, you can open a new issue with your patch. Setting metadata back to the closed values.