- Posts: 59
- Thank you received: 1
Kunena 7.0.6 & Kunena 6.4.12 – Security Updates Released
The Kunena team has announce the arrival of Kunena 7.0.6 [K 7.0.6] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 and issues discovered during the last development stages of K 7.0.
The Kunena team is also pleased to announce the twelfth version of Kunena 6.4, a native Joomla extension for Joomla! 5.0, 5.1, 5.2, 5.3, 5.4 and 6.0.
This category is for general discussion about the Kunena Project or this website.
Please use other categories for questions about problems that you may be having with your website.
Please use other categories for questions about problems that you may be having with your website.
Question User Groups, User Group Privileges, ACLs
16 years 1 week ago #49307
by Dannymh
Replied by Dannymh on topic Re:[Merged topic] User Groups, User Group Privileges, ACLs
awesome thanks for the update matias. I might hack something up for my own use on my site but look forward to this coming into mainline
The topic has been locked.
15 years 11 months ago #51095
by Dannymh
Replied by Dannymh on topic Re:[Merged topic] User Groups, User Group Privileges, ACLs
Just an FYI if anyone is interested. I have started writing this into the system.
To do so I have added 3 tables
jos_fb_usergroups
jos_fb_usergroup_members
jos_fb_usergroups_forums
I could probably get away with just 2 of these, but it's better to have more tables doing less IMO and I didn't want to alter any existing tabled. We can clean this up once everyone is happy with the functionality.
On the front-end this adds 1 additional query, so far. It is a simple query within the allowedforums function which checks for forums that are group restricted and that the current user ID has access to. This then propegates across all functions that have allowed forums.
What I havent yet decided is how to mark the forum as completely private, my issue comes from forward thinking, as in Joomla 1.6 we will freely be able to add and edit the Joomla core ACL and as such we can't just assign a number like 500 to the list.
However from what I can see we can add an ACL group of "1" to the restriction of the forum and thus it will show as "hidden" unless you are a member of any usergroup who has access to that forum.
This isn't ideal so I may end up altering the current query which checks permissions to include my query and base all permissions off of that.
Groups won't be as restrictive as allowing for read/write access it's just "You have access or you dont"
Really this is the best we can do at this stage without large scale rewrites, and because I am not a developer of Kunena I didn't want to alter their code or step on any toes.
Anyway I have it working, I just need to finish the admin interface and think of the best way to choose a forums restriction but that really won't be much to decide on.
Anyway hopefully this covers enough basis for all and either the Kunena team or someone else can take what I have written and better integrate it with proper read/write permissions, I jut wanted quick and dirty without massive overheads.
Will release the changes soon
To do so I have added 3 tables
jos_fb_usergroups
jos_fb_usergroup_members
jos_fb_usergroups_forums
I could probably get away with just 2 of these, but it's better to have more tables doing less IMO and I didn't want to alter any existing tabled. We can clean this up once everyone is happy with the functionality.
On the front-end this adds 1 additional query, so far. It is a simple query within the allowedforums function which checks for forums that are group restricted and that the current user ID has access to. This then propegates across all functions that have allowed forums.
What I havent yet decided is how to mark the forum as completely private, my issue comes from forward thinking, as in Joomla 1.6 we will freely be able to add and edit the Joomla core ACL and as such we can't just assign a number like 500 to the list.
However from what I can see we can add an ACL group of "1" to the restriction of the forum and thus it will show as "hidden" unless you are a member of any usergroup who has access to that forum.
This isn't ideal so I may end up altering the current query which checks permissions to include my query and base all permissions off of that.
Groups won't be as restrictive as allowing for read/write access it's just "You have access or you dont"
Really this is the best we can do at this stage without large scale rewrites, and because I am not a developer of Kunena I didn't want to alter their code or step on any toes.
Anyway I have it working, I just need to finish the admin interface and think of the best way to choose a forums restriction but that really won't be much to decide on.
Anyway hopefully this covers enough basis for all and either the Kunena team or someone else can take what I have written and better integrate it with proper read/write permissions, I jut wanted quick and dirty without massive overheads.
Will release the changes soon
The topic has been locked.
15 years 11 months ago #51097
by @quila
Replied by @quila on topic Re:[Merged topic] User Groups, User Group Privileges, ACLs
Hi Danymh,
glad to see someone to work on that most requested feature for Kunena. As we have some code for ACL already done and work-in-progress could be useful for all to work together on that feature.
If you are interested you can join our chat (SKYPE) and in that way talk with our devs directly. Just PM me and I'll add you.
Regards
glad to see someone to work on that most requested feature for Kunena. As we have some code for ACL already done and work-in-progress could be useful for all to work together on that feature.
If you are interested you can join our chat (SKYPE) and in that way talk with our devs directly. Just PM me and I'll add you.
Regards
The topic has been locked.
15 years 11 months ago #51099
by Dannymh
Replied by Dannymh on topic Re:[Merged topic] User Groups, User Group Privileges, ACLs
no worries will see what I can do.
I don't mind if this gets scrapped I am baically done, and to be honest this is a dirty way of doing things but it also gets the job done.
My coding style is different from the kunena forums, and I think over all you guys are more skilled than I am.
At the moment, what I will do is finish this as it will only take me a little time, and I won't have to add any more majore changes, then submit the code and you guys can choose whether you want to use any of it or not. Once I am done I will join in and chat to you guys and see wht you think.
I need to write this regardless as I need it to go live with my forums, so I may as well finish it.
I did have to add another query, as for some reason I couldn't get it to work as part of the other queries, but again it's a small one and should add no noticable overheads, it does a dirty replace on the $catlist variable, but means that I don't have to edit any existing tables and making a forum private is simply a matter of making it restricted to any current Joomla ACL group like "author" then if it finds the forum in the usergroup list, it restricts it from view.
Very dirty I know
I don't mind if this gets scrapped I am baically done, and to be honest this is a dirty way of doing things but it also gets the job done.
My coding style is different from the kunena forums, and I think over all you guys are more skilled than I am.
At the moment, what I will do is finish this as it will only take me a little time, and I won't have to add any more majore changes, then submit the code and you guys can choose whether you want to use any of it or not. Once I am done I will join in and chat to you guys and see wht you think.
I need to write this regardless as I need it to go live with my forums, so I may as well finish it.
I did have to add another query, as for some reason I couldn't get it to work as part of the other queries, but again it's a small one and should add no noticable overheads, it does a dirty replace on the $catlist variable, but means that I don't have to edit any existing tables and making a forum private is simply a matter of making it restricted to any current Joomla ACL group like "author" then if it finds the forum in the usergroup list, it restricts it from view.
Very dirty I know
Code:
foreach($rows as $row) {
if (($gid == 24 || $gid == 25) or
($row->moderated and $row->ismod) or
($row->pub_access == 0) or
($row->pub_access == -1 and $uid > 0) or
($row->pub_access > 0 and _has_rights($kunena_acl, $gid, $row->pub_access, $row->pub_recurse)) or
($row->admin_access > 0 and _has_rights($kunena_acl, $gid, $row->admin_access, $row->admin_recurse))
) $catlist .= (($catlist == '')?'':',').$row->id;
//check if forum is private and remove it from the list (dirty but can't think of a better way to do this at the moment without adding more tables of fields and wouldn't work as part of the above query
$privateforum = "select forum_id as isprivate from #__fb_usergroup_forums where forum_id=$row->id LIMIT 1";
$kunena_db->setQuery($privateforum);
$isprivate = $kunena_db->loadResult();
if(!empty($isprivate)) {
$catlist = str_replace(','.$row->id, '', $catlist);
}
//Get the usergroups for the forums
$group_query="SELECT a.forum_id from #__fb_usergroup_forums a join #__fb_usergroup_members b ON a.group_id=b.group_id where a.forum_id=".$row->id." and b.user_id={$uid}";
$kunena_db->setQuery($group_query);
$groups = $kunena_db->loadObjectList();
foreach($groups as $group) {
$catlist .= (($catlist == '')?'':',').$group->forum_id;
}
The topic has been locked.
15 years 11 months ago #51481
by Matias
Replied by Matias on topic Re:[Merged topic] User Groups, User Group Privileges, ACLs
Your solution is close to what I have in my mind -- or at least subset of it. Please join us in Skype -- you can see my Skype account from my profile near this message.
The topic has been locked.
15 years 11 months ago #51487
by Dannymh
Replied by Dannymh on topic Re:[Merged topic] User Groups, User Group Privileges, ACLs
No problem, when I get a chance I will do so. I have improved this somewhat to use only 2 queries but want to do a little benchmarking on the queries themselves (sometimes 2 small queries are faster than one big one)
The topic has been locked.
Time to create page: 0.245 seconds