I'd like to limit my anonymous users to only be able to view and/or download a file. Is there a way to limit the right click menu for a file to include only "View file" and "Download as file"?
I'd like to limit my anonymous users to only be able to view and/or download a file. Is there a way to limit the right click menu for a file to include only "View file" and "Download as file"?
Comments
Comment #1
frosty22 commentedIn file webfm.js is this part which is menu building:
//build menu hashtable
//global to allow external functions to push new menu elements into the menu array
Webfm.menuHT = new Webfm.hht();
try {
Webfm.menuHT.put('root', new Webfm.menuElement(Webfm.menu_msg["mkdir"], Webfm.menuMkdir, Webfm.menuAdmin));
Webfm.menuHT.put('root', new Webfm.menuElement(Webfm.menu_msg["search"], Webfm.menuSearch, ''));
Webfm.menuHT.put('dir', new Webfm.menuElement(Webfm.menu_msg["mkdir"], Webfm.menuMkdir, Webfm.menuAdmin));
Webfm.menuHT.put('dir', new Webfm.menuElement(Webfm.menu_msg["rmdir"], Webfm.menuRemove, Webfm.menuAdmin));
Webfm.menuHT.put('dir', new Webfm.menuElement(Webfm.menu_msg["rendir"], Webfm.menuRename, Webfm.menuAdmin));
Webfm.menuHT.put('dir', new Webfm.menuElement(Webfm.menu_msg["search"], Webfm.menuSearch, ''));
Webfm.menuHT.put('file', new Webfm.menuElement(Webfm.menu_msg["rm"], Webfm.menuRemove, Webfm.menuFileUid));
Webfm.menuHT.put('file', new Webfm.menuElement(Webfm.menu_msg["ren"], Webfm.menuRename, Webfm.menuRenFileUid));
Webfm.menuHT.put('file', new Webfm.menuElement(Webfm.menu_msg["meta"], Webfm.menuGetMeta, Webfm.menuFidVal));
Webfm.menuHT.put('file', new Webfm.menuElement(Webfm.menu_msg["view"], Webfm.menuView, ''));
Webfm.menuHT.put('file', new Webfm.menuElement(Webfm.menu_msg["dwnld"], Webfm.menuDownload, Webfm.menuFidVal));
Webfm.menuHT.put('file', new Webfm.menuElement(Webfm.menu_msg["enum"], Webfm.menuInsert, Webfm.menuAdminNoFidVal));
Webfm.menuHT.put('file', new Webfm.menuElement(Webfm.menu_msg["denum"], Webfm.menuDbRem, Webfm.menuAdminFidVal));
Webfm.menuHT.put('file', new Webfm.menuElement(Webfm.menu_msg["perm"], Webfm.menuGetPerm, Webfm.menuFilePerm));
Webfm.menuHT.put('file', new Webfm.menuElement(Webfm.menu_msg["clip"], Webfm.menuPutLinkInClipboard, Webfm.menuFidVal))
} catch(err) {
alert("Menu Create err\n" + err);
}
You can delete (or comment it) the rows which you dont want in sub-menu.
Comment #2
nhck commentedAs per #803722: Cease support of Drupal 5? support for D4 and D5 has been closed. Sorry, please upgrade to Drupal 6. If you think this issue still applies with Version 6.x please reopen this issue with correct version tag.
Thank you! :-)
Comment #3
Marvine commentedI have the same issue in Drupal 6.
An anonymous user can do right click and delete/move/... any files in the webfm directory.
Comment #4
nhck commentedMarvine,
thank you for posting this. It would be nice if you could provide more information because a short note like this doesn't provide any information nor does it help with the development process.
Which version are you using, how do anonymous users access your webfm? Have you really tried using that options on folders where anonymous users were not permitted to do so or do you just see the option?
If you really think this is an issue please set the status accordingly.
Thank you.
Comment #5
Marvine commentednhck,
Yes you're right, more informations here :
I'm working with WebFM 6.x-2.12 and I have applied this patch http://drupal.org/files/issues/webfm6.x-2.12_0.patch to add the right "create directory".
Now, I have the same request than PaulWood but in Drupal 6 version. Indeed, I would like to limit the right click for an anonymous user to View file/Download File only. Anonymous can't do right click on folders, only on files.
I hope this is more clear.
Comment #6
nhck commentedMarine,
that patch wasn't named correctly - which issue is it from?
Still: How do anonymous users access your webfm? The filebrowser shouldn't be accessible for anonymous users?
Comment #7
Marvine commentedThe patch is from : http://drupal.org/node/199820
The anonymous user access my webfm with the url mysite/webfm in the general menu and without the patch I get the message "No trees found in Public Access" like the issue http://drupal.org/node/475294.