Currently:
Access denied is triggered for a single "license" if its denied by the return of the commerce_file allow download hook called in commerce_file_file_download().
Reason for revamp:
This is not ideal as commerce_file_file_download() searches for first allowed license and then returns headers to allow download. This means that not all "expired" licenses would be checked to trigger an access denied hook. Additionally, hook_file_download() has been increasing being called by other modules simply to check access of a file when a physical download is not actually taking place - ie image module for derivative images and this module to check access for field display (#1244818: Allow field access for commerce_files when referenced in nodes).
Proposed:
Revamp commerce_file_file_download() to check for allowed licenses and if none trigger access denied for the fid or uri. With this method, anyone could implement the hook and process all licenses for that fid since there was no license that granted access.
Short term fix:
Commented out calling this hook per http://drupalcode.org/project/commerce_file.git/commitdiff/0c72518
Comments
Comment #1
recrit commentedadding tag
Comment #2
recrit commentedretagging to beta3
Comment #3
recrit commentedComment #4
brianlp commentedSorry for pushing. There seems to be no workaround or temporary solution for this problem. Without file access the whole site is broken/out of order. Is there any help in sight?
Comment #5
recrit commented@papalapapp: this issue deals with the specific rule event created by Commerce File for access denied. The access denied for the actual file has always been operational.
I updated title to reflect that this issue about the rules event triggering.
Comment #6
recrit commentedComment #7
recrit commentedComment #8
bojanz commentedNo reason to revamp now that the 1.x branch is frozen.
Comment #8.0
bojanz commentedadded commitdiff link