CB Blogs K2 integration does not respect K2 groups authorization

11 months 1 day ago #319134 by activha
here is Fotis answer :

Yeah, sorry we don't have the exact HTML ready. But it's not difficult to search the code for relevant examples, as the drop-down is used in many places. E.g.:

github.com/getk2/k2/blob/e574284dfbef1cc01d967b08fb734fcf90e41faf/administrator/components/com_k2/views/categories/view.html.php#L143-L149

Please Log in to join the conversation.

11 months 23 hours ago #319143 by krileon
That's just calling K2ModelCategories->getData, which doesn't do access checks either. K2ModelItemlist->getData does, but those functions also do filtering and other things. We basically just want a list of access checked categories. Will review how to go about this as will likely just query the database directly and parse the data ourselves.

forge.joomlapolis.com/issues/8046


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

3 weeks 5 days ago #324442 by activha
I am coming back on this subject

It seems resolved on the forge but our users have still accesses to all categories whatever k2 groups they are in.
The function may check main joomla accesses but surely does not check what group the user belongs to in order to allow him access to authorized categories or not

Mind to have a look ?

Please Log in to join the conversation.

3 weeks 4 days ago - 3 weeks 4 days ago #324449 by krileon
Works perfectly fine in my tests. See the below with it working. We're using K2s own API to get a list of accessible categories so if it's still not working it's probably an issue with your category configuration.

K2 Categories


Blog Categories


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Attachments:

Please Log in to join the conversation.

3 weeks 4 days ago #324455 by activha
You are right for joomla user groups but it does not work for K2 user groups

Attachments:

Please Log in to join the conversation.

3 weeks 4 days ago #324456 by krileon
Sorry, I don't know how to support those. I'm just directly calling K2s own API requesting a list of accessible categories. Specifically the below.

$items = new K2ModelItemlist();
$allowed = $items->getCategoriesTree();

I don't see any other API for getting a category list so I've no idea how to apply those permissions to the categories list and there's no documentation for this.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.479 seconds

Facebook Twitter LinkedIn