My site has certain groups and a book assinged to each group. When users try to create child pages to this book using the link below the page, i.e "Add child page" , it shows access denied. But he can create a child page by clicking on the link "Create book page" in the group navigation box. Is this a bug?
The links are
1. http://mysite/node/add/book/parent/5 ==>gives Access denied for the group user. (group user role is group specific )
2. http://mysite/node/add/book?gids[]=50 ==>works perfect. (here i have to choose the book page under which i have to add the child page)
i have given permissions for "group user role" to access "create/edit/edit own/printer friendly" book pages.
If i assign this role to a user which is normal user not group specific, it works fine.
How to fix this? Any pointers?
mrrijo
Comments
Comment #1
somebodysysop commentedHere's some code I just created for the relativity module issue. Add it to the end of og_user_roles_init():
It appears to work in my case. Let me know if it works in your's.
Comment #2
mrrijo commentedthanks, i will give a shot on Monday when i get to office.
Comment #3
mrrijo commentedYes it worked. But i got a warning
warning: in_array() [function.in-array]: Wrong datatype for second argument in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\sites\all\modules\og_user_roles\og_user_roles.module on line 768.
And the line 768 was
" if (arg(0) == 'node' && arg(1) == 'add' && is_numeric(arg(4)) && (!in_array(arg(2), $exempted)) ) { "
Another thing to be noted is, "Viewing printer friendly page" is still not working.
Anything more to edit?
Comment #4
somebodysysop commentedThe snippet needs to go inside of this if clause in hook_init:
Insert this code into og_user_roles_all_roles():
Just before:
Comment #5
mrrijo commentedWow, both worked! excellent. Thanks.
Comment #6
somebodysysop commentedComment #7
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.