Needs work
Project:
Web File Manager
Version:
6.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
30 Jul 2010 at 17:31 UTC
Updated:
9 Feb 2011 at 22:24 UTC
Jump to comment: Most recent file
Comments
Comment #1
nodecode commentedComment #2
cgmonroe commentedA quick local fix to do this would be to disable this permission in the putperm ajax command. The code that handles this command is in the webfm.module file, in the webfm_ajax() function. It's the "putperm" case of the command select statement.
FYI - the file permissions are a single integer value that uses a bit mask to indicate if a permission is set or not. These bits are defined in the "file accees bits" constant at about line 24.
The quick way to ensure the public permission is never set is to add the coded needed to set the WEBFM_FILE_ACCESS_PUBLIC_VIEW bit to 0 when ever the putperm command is issued. This can be done to do a bitwise operation with the mask WEBFM_MAX_FILE_ACCESS - WEBFM_FILE_ACCESS_PUBLIC_VIEW.
Here's some untested code that would do this. Note this means people can still select the option... it just won't be stored.
Patches to generalize and make it an admin setting welcome.
Comment #3
nhck commentedComment #4
nodecode commentedI know its been a while but i just got around to testing this code and unfortunately it does not work as coded. I put it in the right place (around line 1278) and it looks like it makes sense to me but i get an error on the file permissions popup: webfm_dbupdate_file() fail regardless of what permissions i try and set (see attached image). Commenting out the code i just put in fixes the issue.
Any idea why this might happen? Is there something i can test?
Comment #5
nodecode commentedis there perhaps some way to disable all permissions controls for webfm users?
Comment #6
nodecode commented@cgmonroe: Aaaha! I think i figured out what you meant with your air code. Does this look right??
$perm['perm'] = $perm['perm'] & (WEBFM_MAX_FILE_ACCESS - WEBFM_FILE_ACCESS_PUBLIC_VIEW);So far (after very minor testing) it seems to work as you explained.