By Inspire Theme LTD on Monday, 17 August 2015
Posted in General Issues
Likes 0
Views 0.9K
Votes 0
Hey guys,

I have a quite serious permissions issue with EasyDiscuss. I'll try to explain everything in details.

1. I use PayPlans so users can purchase a Membership.
2. I use the PayPlans "Joomla User Type" app so whenever a user purchase a subscription, he is assigned to the "Active Customers" Joomla User Group.
3. I have configured my EasyDiscuss Categories to allow access based on the "Active Customers" user group. More specifically, I have the following:

- "Announcements" category where only "Super Admin" can publish a new Discussion ("Who can select this category when creating discussion.")
- The other categories where only users in the "Active Customers" group can open a new Discussion ("Who can select this category when creating discussion.") and can see the replies ("Who can view replies in this category.")

When the Membership of a user expires, he is removed from the "Active Customers" user group so he should not be allowed to open new Discussions in the Forum (EasyDiscuss). But for some reason, the EasyDiscuss permissions get messed up when the membership expires. Here's what happens:

- While the user has an active membership (is part of the "Active Customers" group) everything is fine. He is NOT able to open Discussions in the "Announcements" category and he is able to open Discussions in the other categories. So far, so good...
- But once the subscription for this user expires, he somehow is able to open a discussion in most of the Categories, including the "Announcements" category, where only Super Admins should be able to publish.

Basically, once the subscription/membership of the user expires, he should not be able to publish any discussions in the Forum.

I understand that the above is a bit confusing so I recorded a very, very detailed video describing everything. You will find the video URL and my site details under the "Site Details" tab.

Thank you in advance and I really hope that this will be fixed soon.

P.S. Guys, this is a pure EasyDiscuss issue. Please, please do not try to accuse PayPlans for this. Just look into the issue and investigate it.
hey Ivo,

I am really sorry that I didn't explain very well of my fix above.

Actually that was a bug on our end after troubleshoot long time ago from yesterday night.

Let me explain again with my fix above.

If the user HAVE permission to post in any of one category in your site + Active subscription
STEP 1 : Login as `media` user account (with active subscription)
STEP 2 : Only this category active subscription member do not have permission to post in this category `Announcements`, screenshot here : http://screencast.com/t/Tov6cS0MT4o
STEP 3 : So it will show all the category without this category `Announcements`, screenshot here : http://screencast.com/t/3OXgvgmSw6E

If the user ATLEAST have permission to post in ONE of the category in your site + Expired subscription
** By default all of your categories do not have allow `registered user group` to create post in any of categories.
Then I added one of the category `registered` user group allow to create post in this category `General Offtopic`, check my screenshot here : http://screencast.com/t/jN4kyla32C

STEP 1 : Login as `media` user account (with expired subscription)
STEP 2 : When the user click on `Ask` question button, it will only allow user post in this category `General Offtopic` (screenshot : http://screencast.com/t/q9fHDbLkmJh )

If the user DO NOT have permission to post in any of category in your site + Expired subscription
Then the system will check if there do not have assign any category permission for this `Registered` user group to create post, it will show a system message "Sorry, but you do not have sufficient privileges to perform the requested action" when the user click on the `ask` question button.

Example : If I didn't do redirection to discussion homepage, it will show the ask question page then user will think that they still can submit a new post, but all the category will not show out is because they do not have permission to submit post in any of category in your site. (screenshot : http://screencast.com/t/jShIKoqhmjl0 )

Just fix the **** bug! Do not change the whole logic by adding hacks to files that cannot even be overriden!

I believe you misunderstand with my sentence at above for the `override` this keyword, I am sorry for that my English is not good as well.

First, I trying to apply the fix in this file on your site -> JoomlaFolder\components\com_easydiscuss\themes\simplistic\searchbar.php but whatever I modified/remove the code from this file, it still show everything on the page. i thought that was cache issue then I went to backend > system > clean cache, it still the same.

So I went to JoomlaFolder/template/inspiretheme/html/.. file location then I noticed you already have did some customization in this file
com_easydiscuss/searchbar.php , you can take a look what you customized on this file ( screenshot : http://screencast.com/t/bVPqQYrdgDeO ) , Since I knew you have customized something in this file, so I just applied my fix in this part of code.


// LINE 31
<?php if( $system->config->get( 'layout_toolbar_cat_filter' ) ){ ?>
<div class="discuss-tablecell discuss-searchbar--left discuss-searchbar--filter">
<div class="discuss-searchbar--select">
<?php echo $nestedCategories; ?>
</div>
</div>
<?php } ?>

//Replace with
<?php if ($system->config->get('layout_toolbar_cat_filter')) { ?>
<?php if (!empty($nestedCategories))) { ?>
<div class="discuss-tablecell discuss-searchbar--left discuss-searchbar--filter">
<div class="discuss-searchbar--select">
<?php echo $nestedCategories; ?>
</div>
</div>
<?php } ?>
<?php } ?>


By the way this fix will included in next release version.

Hope this explanation will help.
·
Thursday, 27 August 2015 12:40
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Ivo,

I am sorry that delay of this reply,

Thank for your described on your current issue very clearly, that was strange is because I tried in my local it work fine, can you provide us with your FTP access so we can troubleshoot on this?
·
Tuesday, 18 August 2015 17:17
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Arlex,

Please find the FTP details below.

I really hope you can fix this soon as I cannot release the website like that. Thanks.
·
Wednesday, 19 August 2015 00:49
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Lvo,

I am really sorry that delay of this reply.

After debugging long time ago, everything category acl is stored correctly in database, but it still can't respect what we set for the category acl restriction.

After tested few time ago, it suddenly work.

You can take a look of my video link here : http://screencast.com/t/hWOzR3GdkbU

Can you give it a try and see how it goes?
·
Thursday, 20 August 2015 01:05
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Arlex,

Thanks for looking into this.
Yes, I can confirm that it works fine now.
I also noticed that your have installed MijoSQL, but what queries have you executed?

Anyway, I really appreciate that you fixed the issue but this is my test installation. How can I fix this issue on my own with the production installation? I mean what are the steps I need to perform and eventually, what are the SQL queries I need to execute?
·
Thursday, 20 August 2015 01:45
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Ivo,

I am sorry that delay of this reply,

Actually that was no correct step to fix this, I believe that could be cache issue, because what i did last night is open this few file do the var_dump and see is it get correct category restriction acl , then print out the query and execute the query in mijosql, everything is seems work fine.
JoomlaFolder\components\com_easydiscuss\views\ask\view.html.php
JoomlaFolder\components\com_easydiscuss\helpers\helper.php
JoomlaFolder\components\com_easydiscuss\models\categories.php

#1. create new user assign in `registered user group`
#2. create new category and assign `registered user group` can select this category
#3. then remove back the registered user group from the category acl

After 2~3 hours then suddenly work fine for some reason.

Perhaps you can provide us with your live site, so I can take a look of this?
·
Thursday, 20 August 2015 12:21
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex,

The problem came back. It is not resolved, not at all.
I just deleted the test category you had created and I uninstalled MijoSQL. These are all the changes I have done.

Please look at the issue again and provide me with a permanent solution and clear steps what you have done. Thank you.
·
Monday, 24 August 2015 18:24
·
0 Likes
·
0 Votes
·
0 Comments
·
I need the exact steps!
I need to know everything you do with the website.
I need to know the exact queries you execute so I know what you have changed in my Database.
·
Monday, 24 August 2015 18:28
·
0 Likes
·
0 Votes
·
0 Comments
·
Please update me on this issue.
·
Wednesday, 26 August 2015 22:44
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Ivo,

I am really sorry that delay of this reply because I still investigate on this strange issue on your site and I didn't run any extra sql query in your site, what I did last time is just print out the value and check for the data is it show out correctly.

I will continuous check this at midnight later.
·
Wednesday, 26 August 2015 23:31
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Ivo,

Can you give it try again is it everything work fine now?

if yes, I modified these following files, you can copy over in your live site.

JoomlaFolder\components\com_easydiscuss\views\ask\view.html.php
JoomlaFolder\components\com_easydiscuss\helpers\helper.php
JoomlaFolder\components\com_easydiscuss\models\categories.php
JoomlaFolder\templates\inspiretheme\html\com_easydiscuss\searchbar.php (I do not know your live site is it override this file in your template folder or not)
·
Thursday, 27 August 2015 02:28
·
0 Likes
·
0 Votes
·
0 Comments
·
Arlex, I see that you have spent some time in doing these modification but I really cannot accept this solution.

And I hope you understand - most of the files that you have modified cannot be overriden in the template. How will I update EasyDiscuss in the future, how will I keep track of what's happening? For me this is just a dirty hack, not a solution.

I saw the System Message that appears if someone with expired membership (not member of "Active Customers" user group) tries to "Ask a question". You have changed the logic completely. Why you just didn't fix the bug? The bug is so obvious, I explained everything in details, I recorder a video for you explaining everything!

Just fix the **** bug! Do not change the whole logic by adding hacks to files that cannot even be overriden!

1. Login to my Admin and go to the EasyDiscuss Categories.
2. Check the permissions of all categories
3. See that users who are part of the "Active Customers" user group can publish in all categories
4. See that users who are not part of the "Active Customers" user group cannot publish

What the hell is wrong with you guys? Do you understand how frustrating all this is becoming?

Can you please involve other people from your team in this Discussion, for example Mark?

I have no words to express my disappointment. I've heard only good things for you guys but this is getting quite ridiculous!
·
Thursday, 27 August 2015 06:46
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex,

Alright, now I understand everything!
Thank you very much for your time and effort. I really like how you have solved the bug. Thank you very much and sorry for my emotional comment yesterday. I hope you understand me

I understood what you mean with the "override". My biggest concern was that you have modified some files just to apply a workaround for my particular case. But now I understand that this was a bug in EasyDiscuss and you will include the fix in the next release. So I'm very happy

One very important thing - when will you release the next version that will contain the fix? I need it for my production website (I do not want to copy the files that you have modified). My website will go live in about 3 weeks, so I hope you will release the new version until then? Please let me know because it is very important.

And once again, thank you very much
·
Friday, 28 August 2015 00:57
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Ivo,

Thanks for getting back to us on this. We'll most likely release another version of EasyDiscuss sometime next week
·
Friday, 28 August 2015 03:15
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks guys!
You just turned one disappointed customer into a happy customer

I'm looking forward for the new release of EasyDiscuss. Please, please do not forget to include the fix in it.
·
Sunday, 30 August 2015 00:11
·
0 Likes
·
0 Votes
·
0 Comments
·
You're welcome, we will include the fix in next release version.
·
Sunday, 30 August 2015 12:58
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post