Access controlled FAQs not shown as popular/latest

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
CCTJNII
Posts: 9
Joined: Thu Oct 23, 2014 4:30 pm

Access controlled FAQs not shown as popular/latest

Post by CCTJNII »

I'm using access controls on my FAQs to limit who can view them. However, I'm noticing when I set access controls the FAQ no longer shows in the "Most popular FAQs" and "Latest FAQs" listings. I would like access controlled FAQs to show in these categories, assuming the user has permissions to view the FAQ. I'm assuming this would be a fairly difficult change, can someone advise where in the code the "Most popular FAQs" and "Latest FAQs" listings are populated? I'd like to dig in and see how hard of a change this would be. Thanks.
Thorsten
Posts: 15749
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Access controlled FAQs not shown as popular/latest

Post by Thorsten »

Hi,

if the user is logged in, the use should see the results. Which version do you use?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
CCTJNII
Posts: 9
Joined: Thu Oct 23, 2014 4:30 pm

Re: Access controlled FAQs not shown as popular/latest

Post by CCTJNII »

2.8.15

My user can view the access controlled FAQ when showing the category, but the "Most popular FAQs" and "Latest FAQs" do not show it.
Thorsten
Posts: 15749
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Access controlled FAQs not shown as popular/latest

Post by Thorsten »

Hi,

please upgrade to 2.8.18 and try it again.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
CCTJNII
Posts: 9
Joined: Thu Oct 23, 2014 4:30 pm

Re: Access controlled FAQs not shown as popular/latest

Post by CCTJNII »

I figured it out, I had a user control set as well, which cause the following line to reject the row:

Faq.php L1896

Code: Select all

if (!in_array($row->user_id, array(-1, $this->user)) || !in_array($row->group_id, $this->groups))
So the !in_array($row->user_id, array(-1, $this->user)) was causing the reject. I turned off the user ACL and things started working as expected. Interesting, though, that I could view the FAQ with access restricted to a different user_id.
faariwasi
Posts: 1
Joined: Wed Dec 31, 2014 10:47 pm

Re: Access controlled FAQs not shown as popular/latest

Post by faariwasi »

We found that it is easy to give access/view right for an user in a particular category. However, it seems no control to the user to edit a particular category. The edit right seems a common right to edit all categories once it is granted. Is it possible to control the edit right per category? How?
wasi
Thorsten
Posts: 15749
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Access controlled FAQs not shown as popular/latest

Post by Thorsten »

Hi,

it isn't possible currently. If you need that feature, please add a feature request here: https://github.com/thorsten/phpMyFAQ/issues

Thanks!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply