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

recrit’s picture

adding tag

recrit’s picture

Issue tags: +7.x-1.0-beta3

retagging to beta3

recrit’s picture

Priority: Normal » Major
brianlp’s picture

Priority: Major » Critical

Sorry 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?

recrit’s picture

Title: Revamp triggering access denied » Revamp triggering access denied Rules event

@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.

recrit’s picture

Priority: Critical » Major
recrit’s picture

Priority: Major » Normal
Status: Active » Postponed
bojanz’s picture

Status: Postponed » Closed (won't fix)

No reason to revamp now that the 1.x branch is frozen.

bojanz’s picture

Issue summary: View changes

added commitdiff link