Project:Web File Manager
Version:6.x-2.11
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (duplicate)
Issue tags:access permissions

Issue Summary

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')) {
AttachmentSize
webfm.module.patch829 bytes

Comments

#1

Category:task» feature request
Status:active» postponed

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.

#2

Version:6.x-2.10-rc5» 6.x-2.11

There is an approach to allowing local administration for version webfm-6.x-2.11 as a patch under the issue #394570: New Directory create/manage permission .

But this patch is not perfect as it also enables 'adding to database' icons but doesn't provide the permissions for using this functionality.

I think improving that patch of #394570: New Directory create/manage permission , moving the user interface to the admin/user/settings page to allow per role permission, use the permission name "administer webfm for role" and rework the database icon permission would be the ideal solution.

#3

Well I recently see this thread, I submitted my version in a patch at: http://drupal.org/node/199820

#4

Status:postponed» closed (duplicate)

This issue is a duplicate of #394570: New Directory create/manage permission .