I've activated the module and enabled for some specific role 'view any page content' permission, but when this user with selected role is logged in, he can't access any of page (Access denied).
欢迎各位兄弟 发布技术文章
这里的技术是共享的
I've activated the module and enabled for some specific role 'view any page content' permission, but when this user with selected role is logged in, he can't access any of page (Access denied).
Comments
Comment#1
djuba CreditAttribution: djuba commentedplease provide more details: drupal version, have you already install some modules related to access management? also, do you rebuild permissions after changing? try to rebuild permissions on <your-installstion>admin/content/node-settings
Comment#2
kenorb CreditAttribution: kenorb commentedDrupal 6.x, view_own-6.x-1.1
Yes, I tried lots of access management modules maybe that's the reason (simple access, Content access, etc.),the only which was working for me it was node_privacy_byrole. But now I can't test it again to make sure what was the reason.
Comment#3
djuba CreditAttribution: djuba commentedReally, node privacy by role and view own have different purposes. If you want to try View Own try to disable other access management modules and rebuild permissions. also, how you create content types? are they difficult or simple?
Comment#4
kenorb CreditAttribution: kenorb commentedI've tested on simple Page content. Wanted to disable access for one specified page for anonymous and after unticked access for Anonymous section, access still was.
I'm not using right now 'View own' module, so I can't test it again.
Maybe someone will have similar problem.
Comment#5
kenorb CreditAttribution: kenorb commentedProbably it was problem of old nodes, because view permission are generated for new nodes, so if you will enable View Own, it will work only for new or updated nodes.
Comment#6
kenorb CreditAttribution: kenorb commentedAnd there is another issue, when I'm using workflow+path_redirection, node_access_records hook is not called, because nodeapi is called before and path_redirection during workflow action is redirecting the page.
Reported this issue here: #322636: node_access_acquire_grants() should run before node save/update
Comment#7
steveparks CreditAttribution: steveparks commentedI'm seeing a similar issue.
Core = 6.9
Other access control modules enabled:
og
cck content permissions (field level access control for cck fields)
Trying to create a front page for anon users - using advanced_front_page module, and a 'page' node'
I have view_own enabled to allow me to restrict viewing of a help ticket content type (as suggested on the project page) - so i have ticked 'view all pages' for all user types.
i've rebuilt permissions - but anonymous users still can't access the page.
Any advice appreciated. Thanks for the module - great idea.
Steve
Comment#8
kenorb CreditAttribution: kenorb commentedTry to edit this node that you have no access and just save it again and tell if it worked.
Comment#9
steveparks CreditAttribution: steveparks commentedHi,
Thanks for the suggestion. I've tried that now, and unfortunately it didn't solve the problem. I also tried rebuilding permissions again and still no joy.
It's a puzzle!
steve
Comment#10
kenorb CreditAttribution: kenorb commentedDid you tried to disable 'field level access', and other permission modules and rebuild permission and test it with only 'view own'? Maybe there is some conflict with other module.
If still there is a problem, try add return; on the top of view_own_node_access_records(), if it will help, definitely there is some problem with view_own permissions.
I've found before some bugs in View_own here: #324657: delete content permission doesn't work properly ($delete_perm is not set), but there was no any response.
I supposing that there is some problem with this line:
as I've described here #324657: delete content permission doesn't work properly ($delete_perm is not set).
So because $delete_perm is not defined nowhere, try to use patched code from above issue. I haven't tried, because I'm using my own patches to view_own for specified functionality #323692: grant permission via CCK Reference field (nodereference or userreference).
So I don't know if it'll fix the problem, or there are different bugs.
Comment#11
kenorb CreditAttribution: kenorb commentedJust rebuild the permissions.
Comment#13
SchwebDesign CreditAttribution: SchwebDesign commentedthis thread didn't seem very helpful to me when reading over it... but did you see this: http://drupal.org/node/492116#comment-2666926 This worked for me.
来自 https://www.drupal.org/node/314797