Is is possible to add the ability for an authorized user to delete files from a directory listing?

CommentFileSizeAuthor
#7 filebrowser.549634.patch338 bytesclivesj

Comments

fabrizioprocopio’s picture

+1

Yoran’s picture

Status: Active » Fixed

This is in last (next) dev.

Status: Fixed » Closed (fixed)

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

kvoltz’s picture

Priority: Normal » Major

Hi,

This feature - while available, does not seem to be working. Has anyone had any luck with this?

jleroi’s picture

Thanks Yoran!

Haven't tried yet kvoltz. I'll test it out.

Nicolas Georget’s picture

Version: 6.x-2.0-rc9 » 6.x-2.x-dev
Category: feature » bug
Status: Closed (fixed) » Active

I have a "Access denied" when a user is authenticate && authorized to delete a file/folder. But a success with the user->uid = 1
example.com/filebrowser/delete/10701?destination=/dir-list/test

I used the dev-version as Yoran mentioned in #2

clivesj’s picture

StatusFileSize
new338 bytes

Hook_menu is not using the proper constant for the file delete callback.
It is using FILEBROWSER_DELETE i.s.0 FILEBROWSER_DELETE_FILE.
You can change this in line 427:

      'type' => MENU_CALLBACK, 
      'access arguments' => array(
          FILEBROWSER_DELETE_FILE

Remember to clear cache menu.

Here´s a patch (against the latest dev -so with the other issues still not corrected)
If it works OK, can you set the status to RTBC? Thanks

Nicolas Georget’s picture

Status: Active » Reviewed & tested by the community

Well done !!

Yoran’s picture

Status: Reviewed & tested by the community » Fixed

thanks clivesj :) It'll be in next dev.

Status: Fixed » Closed (fixed)

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