New PERM for "Create directories"
jcdenton.dm - July 31, 2009 - 10:14
| Project: | Web File Manager |
| Version: | 6.x-2.10-rc5 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed |
| Issue tags: | access permissions |
Jump to:
Description
I have users the they want create directories but not admin webfm.
A simple patch to this:
--- webfm.module.orig 2009-07-31 11:57:05.000000000 +0200
+++ webfm.module 2009-07-31 12:06:12.000000000 +0200
@@ -171,7 +171,8 @@
* Implementation of hook_perm().
*/
function webfm_perm() {
- return array('access webfm', 'view webfm attachments', 'administer webfm', 'webfm upload');
+ return array('access webfm', 'view webfm attachments', 'administer webfm', 'webfm upload',
+ 'webfm create directories');
}
/**
@@ -849,7 +850,7 @@
global $user;
//3 possible outcomes - the user is either an admin, user or prohibited
- if(($user->uid == 1) || user_access('administer webfm')) {
+ if(($user->uid == 1) || user_access('administer webfm') || user_access('webfm create directories')) {
// Admins have total access
$webfm_perm = WEBFM_ADMIN;
} else if(user_access('access webfm')) {| Attachment | Size |
|---|---|
| webfm.module.patch | 829 bytes |

#1
Creating directories isn't the road block for me - it is the ability to move blocks of files via directory drag and drop. Since security is largely based on path this is a feature that non-admins should not have. A local admin role requires much modification of the code. This is a feature request that I'm postponing.