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

djuba’s picture

 

Status:Active» Postponed (maintainer needs more info)

please 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

kenorb’s picture

 

Status:Postponed (maintainer needs more info)» Active

Drupal 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.

djuba’s picture

 

Status:Active» Postponed (maintainer needs more info)

Really, 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?

kenorb’s picture

 

I'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.

kenorb’s picture

 

Status:Postponed (maintainer needs more info)» Closed (won't fix)

Probably 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.

kenorb’s picture

 

Status:Active» Closed (works as designed)

And 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

djuba’s picture

 

Status:Closed (won't fix)» Active

I'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

kenorb’s picture

 

Status:Closed (works as designed)» Active

Try to edit this node that you have no access and just save it again and tell if it worked.

djuba’s picture

 

Hi,

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

kenorb’s picture

 

Did 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:

        $view_perm = (($edit_perm || $delete_perm) ? 1 : in_array($view_any_content, $default_permissions[$rid]));

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.

kenorb’s picture

 

Category:bug» support
Status:Active» Fixed

Just rebuild the permissions.

 

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

SchwebDesign’s picture

 

this 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