XF 2.1 What's on my mind? Covid, but that is not why I am posting here

Lawrence

Well-known member
Ok, been away from coding for about a month, but now I feel it is time for me to get back into it.

I was currently working on updating my contacts add-on to add a feature where only members of a contact list can view a thread that the starter created that uses a contact list they are a member of. This part works as intended. Now my question is: for what's new, search, rss, etc., do I need to add an extension for each so that those who are not a member of the thread's contact list can not view the returned results, or can it be done with one extension? I rather just use one to keep things as simple as possible, but the last time I looked I could not find that one common query that I could extend that covers them all. Note, that the check is not permission based, the contacts table must be joined based on the thread's contact list id.

So, an extension for each, or can it be done with one extension? If it can not be done with one extension, what other areas do I need to extend so that the threads are not retrieved for members/guests that are not a part of the selected contact list?

Thanks, and stay safe, :)
 
What's on my mind?
Will the RTX 3000 series card cost me both of my kidneys?

but the last time I looked I could not find that one common query that I could extend that covers them all
Unless you go yolo and extend the XF:Thread finder but even then you will require to extend canView() in XF:Thread entity for the new posts widget, news feed and so on.

So, an extension for each, or can it be done with one extension? If it can not be done with one extension, what other areas do I need to extend so that the threads are not retrieved for members/guests that are not a part of the selected contact list?
Basically all the find prefixed methods in XF:Thread repository. Other places such as news feed and the new posts/new threads will overfetch threads and then call filterViewable() and finally slice(0, $perPage).

So, an extension for each, or can it be done with one extension?
Don't think so! Have a look at how XFMG handles the album/media(?) privacy.
 
Thank you @TickTackk, as always appreciative of your help.
Have a look at how XFMG handles the album/media(?) privacy.
Thanks, :) I know why I haven't thought of that, too much on my mind recently.

Basically all the find prefixed methods in XF:Thread repository.

I looked at the thread repository, and seen how many extensions were going to be needed, and that's why I asked, hoping there was another way. Oh well, more extensions it is... :)

Will the RTX 3000 series card cost me both of my kidneys?
Most likely, would it be worth it?
 
Top Bottom