With Views and Views Bulk Operations, I want to bulk edit a field linked to the files.
But nothing is done and I see the following error in the log messages:
Skipped <em>action name</em> on file <em>filename</em> due to insufficient permissions.
Looking in VBO code I found out that entity_access($op, $entity_type, $entity, $account) send false even if I'm admin.
Is it a known issue?
Anyone could please help me getting through that?

Comments

Thithi32’s picture

Apparently entity_access is calling entity_metadata_file_access and not entity_file_access

Dave Reid’s picture

Status: Active » Postponed (maintainer needs more info)

I believe this was fixed with #1818068: Add "access callback" to file_entity_entity_info_alter()? Can you try updating to the latest 7.x-2.x of file_entity, clearing caches and checking again?

Thithi32’s picture

Unfortunately I'm using the last dev version (7.x-2.0-unstable7+15-dev). I don't understand why entity_file_access function isn't registered as the file entity access function. Instead it is entity_metadata_file_access ...

Thithi32’s picture

I still haven't found how to solve it. Anyone can help me debug that issue?

keesje’s picture

gmclelland’s picture

I'm using the latest devs. I don't get the permission errors, but for some reason when I try to use the VBO at admin/content/file it doesn't seem delete the files or update them? It goes through the motions, but nothing ever happens.

Note: I'm using all the latest dev versions of the modules including the admin_views module. This issue might be related to my issue #1256946: Provide a default files admin screen via Administration Views.

rooby’s picture

Status: Postponed (maintainer needs more info) » Active

@gmclelland:

I have the same setup as you with the symptoms you describe, however I wager that if you check your watchdog logs you have the permission errors in there.

I agree with keesje that this is likely a duplicate of #1831578: Use file_entity_access() callback when file_entity module is present as the patch in there fixes/works around it for me (although it is likely not the final solution).

gmclelland’s picture

@rooby - Your right the patch #1 at http://drupal.org/node/1831578#comment-6690058 fixes the problem for me. Thank you

Devin Carlson’s picture

Status: Active » Closed (duplicate)

I don't think that anything can be done on the File entity side to solve this problem.