I enabled view/download by role, and then uploaded a file as admin (I'd separately assigned admin to a "file uploader" role).

When I access WebFM as another "file uploader" user nothing shows in the directory listing.

How do I get view/download by role working?

This is with 6.x-2.10-rc4 under Drupal 6.9.

- Mark

Comments

markolbert’s picture

Status: Active » Closed (fixed)

I'm replying to my own post and marking it closed as I found the solution.

What I didn't understand is that WebFM manages role-based security by creating root directories for each role that can use WebFM...under the "master" root directory you also define for the entire WebFM "presence" in the file system. For example, in my Drupal installation:

www/sites/default/files: this is Drupal's file system root
www/sites/default/files/webfm: this is WebFM's root (and the home directory of user 1, the superuser)
www/sites/default/files/webfm/somerole: this is WebFM's root for the role somerole, and the home directory of all users having the role somerole

The path setting textbox for somerole (in my example) didn't appear in the Web File Manager configuration settings until after I had configured WebFM to use role-based security and I had granted somerole webfm access rights. This makes perfect sense -- why would there be a configuration option for a role that had not WebFM access rights? -- but it tripped me up because I forgot I had to visit the WebFM configuration page twice, once to tell it to use role-based security, and then again after granting a role WebFM access rights.

I hope this helps someone else.

- Mark

webchick’s picture

Category: support » feature
Status: Closed (fixed) » Active

Wow, that was immensely helpful! Thanks, Mark, for writing up what you found out!

However, as another person who lost about an hour to this problem, I think it's worth elevating this to a feature request to make this more intuitive to people.

Maybe adding some JS enhancements or similar, so that the fieldset appears immediately upon checking Role Based Access, or even just displaying fieldsets for each role even if they don't have permissions set up initially. It's a lot easier to troubleshoot "oops I forgot to check that permission box" than "oops I didn't go back to the settings form for that thing I already configured after I assigned permissions to a role and found a fieldset halfway down the page buried in amonst other settings" ;)

webchick’s picture

Title: Role based access » Make role based access more intuitive to configure

Adjusting title.

robmilne’s picture

Status: Active » Fixed

I've added feedback to the module settings (in head) to indicate which role root directories are not defined by a path

Status: Fixed » Closed (fixed)

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