Setting a non administrative role with "access webfm" granted results in inserting an incorrect file path in FCKeditor image properties window (via "send to rich text editor" item in context menu). Specifically the webfm root dir is missing in path, while for administrative roles the path is correct.
This was reported also for rc4 in http://drupal.org/node/153623#comment-1457922 and not fixed.
I solved this issue by conditionally setting path in webfm_popup.module for non administrative roles. This is done changing:
drupal_add_js(array('webfm_popup' => array('fileDirectory' => file_directory_path())), 'setting');
}
}
with:
if(($user->uid == 1) || user_access('administer webfm')) {
drupal_add_js(array('webfm_popup' => array('fileDirectory' => file_directory_path())), 'setting');
} else {
drupal_add_js(array('webfm_popup' => array('fileDirectory' => file_directory_path() . '/' . variable_get('webfm_root_dir',''))), 'setting');
}
}
}
at end of file.
Hope helps
Comments
Comment #1
Takaratiki commentedConfirm the same bug. The solution as listed fixes the problem perfectly.
Comment #2
robmilne commentedin head