Problems when disabling user directories as per http://drupal.org/node/307016
venkat-rk - November 27, 2008 - 07:34
| Project: | Asset |
| Version: | 5.x-1.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
Using the settings outlined in the first post to prevent creation of user directories seems to have the following consequences at least in asset 1.0 (the official release):
- If I am uid1 (or a role with admin permissions using the admin role module), all is fine. But, for any other user, the image displays as a file attachment on the node even when that user has create assets and create upload assets permissions. I thought it was because I was using the masquerade module, but even when logging in directly as the user, the problem persists.
- For both admin user and a normal user, asset module does not list all the files uploaded to the 'files' directory.
- For user with admin permissions, the wizard still displays directory icons with user names but nothing happens when clicking them. This is quite confusing.
Screenshots attached:
- Logged in with admin permissions
- Logged in as the user
- Files listed in asset wizard for both admin user and users with assets permissions
- Files actually uploaded to 'files' folder
- Directory icons with user names still displayed
I also noticed what seems to be a bug in asset wizard where it says that the file has been uploaded, but checking the files directory in shell, I found the upload isn't completed until the entire wizard is run. May be I should submit a separate ticket for that.
I am not sure how many of these are unintended consequences of uncommenting the code, but the first issue of the asset showing as a file attachment on the node is bad enough to be a show stopper :(
| Attachment | Size |
|---|---|
| asset_module_issue_as_admin.gif | 34.49 KB |
| asset_module_issue_as_user.gif | 12.74 KB |
| files_listed_in_asset_wizard.gif | 14.44 KB |
| files_actually_in_files_folder.gif | 9.25 KB |
| directory_icons_with_usernames.gif | 13.45 KB |

#1
I confirmed that switching back to the asset module default (auto creation of user directories) solves the main issue of an asset being listed as a file attachment on a node for a non-admin user. Screenshot attached.
#2
Disabled user directory creation and re-confirmed that this leads to the same problem of asset being listed as file attachment for non-admin user.