Closed (fixed)
Project:
filedepot
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
11 May 2012 at 16:32 UTC
Updated:
27 May 2014 at 15:18 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
blainelang commentedThanks for reporting this cat, not sure why it was not picked up yet as an issue and I missed it in my testing as well. This is a rather serious bug.
Attached is a patch and I'm going to update DEV right now as well (takes a few hours I think to regenerate a new file)
I've tested it on a couple sites and this should fix the issue. Please test and report back so we can close this issue.
Comment #2
cattalk commentedAs far as I can tell this problem is solved!
Thanks blainelang!
Comment #3
cattalk commentedUnfortunately I have to reopen this issue. Since I installed the new dev version there are massive problems with anonymous users accessing content on the site. All content types have an access denied error for any role except administrators. When the content is listed in views or blocks there is no problem. When content is viewed on node pages then anonymous users get an access denied error.
I have deactivated filedepot and now every node is viewable by everyone.
Thanks
cat
Comment #4
blainelang commentedEvery node as in filedepot_folder nodes?
De-activating filedepot would prevent it's HOOK_node_access from executing which was applying the filedepot specific node access rules. Drupal should now be applying the default access logic - set via permissions.
Comment #5
cattalk commentedWhen activating the dev version of filedepot the site works ok as long as I only have only filedepot nodes. As soon as I have something like basic page these pages can only be viewed by admins.
I have a site where there are pages for normal visitors with text and marketing fluff and I have a restricted area with file depot. When filedepot is activated anonymous users can no longer access the text and marketing pages, they are mostly made of "basic page" content types and some custom content types.
In filedepot module on line 417:
Does that mean all other content types get access denied?
thx
cat
Comment #6
blainelang commentedUh, ok - change that to NODE_ACCESS_IGNORE
So the default is for this HOOK_access to not effect the permissions.
function filedepot_node_access($node, $op) {
$filedepot = filedepot_filedepot();
module_load_include('php', 'filedepot', 'lib-common');
$ret = NODE_ACCESS_IGNORE;
if (!isset($node->nid) OR !isset($node->type) OR $node->type != 'filedepot_folder') {
return $ret;
}
// set the default return to DENY and if user has access return ALLOW
$ret = NODE_ACCESS_DENY;
Try that modified code.
Comment #7
cattalk commentedCool this does the trick! Thanks a lot for your great support!!
sorry I forgot to close the issue...
Comment #8
blainelang commentedYour very welcome, thanks for reporting this issue, your patience and testing!
I will commit the fix and get a new release out today.
- blaine