When you go to the files view that VSF makes and delete a file then it will not delete this file. In the logs it writes:
Skipped Delete item on file mammyblue2.swf due to insufficient permissions.

Access of the "file" entity type (which is not a real entity). Is done via entity_metadata_file_access and this function always returns false for any $op different then "view".

To solve this you'll need to add a entity_info_alter and add a different access callback.

Comments

Johnny vd Laar created an issue. See original summary.

rudiedirkx’s picture

Actually, if you don't have File Entity enabled, VBO should see this entity type doesn't support 'access', and always allow it.

  1. _views_bulk_operations_entity_access($op, 'file')
  2. entity_type_supports('file', 'access')
  3. 'access callback' doesn't exist

What does your entity_get_info('file') say?

I'm running Views dev (3.11+), VBO 3.3 and Entity API 1.6.

Johnny vd Laar’s picture

In Entity API 1.6 you have this _entity_info_add_metadata where this is added:

  // File entity has it's own entity_access function.
  if (!module_exists('file_entity')) {
    $entity_info['file']['access callback'] = 'entity_metadata_file_access';
  }

Which adds an access callback.

rudiedirkx’s picture

Status: Active » Fixed

Ah crap. My local test module unset 'access callback' from the entity info. Sneaky bastard.

How about this? I really didn't want VSF to take on file access, but apparently it has to, because VBO expects it.

  • rudiedirkx committed 6455990 on 7.x-1.x
    Issue #2609050: FIles view gives delete VBO action, but you cannot...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.