<< Home

Suddenly - Everything is Accesable

Use this forum for issues related to TriniTronic's Nice Content Access extension.

Moderator: jamesSBT

Suddenly - Everything is Accesable

Postby Stick » Wed Mar 21, 2012 7:45 am

Can you shed any light on this. I woke up this morning and everything is accessible to the public.

I tried to double check everything and trouble shoot it but I can't figure it out. I haven't installed anything. I checked the plugin order.

Basically I published 4 member articles yesterday and they were locked out and now they are not. The content is on the page. I also tried to create a new article and it is doing the same thing.

I doubt it is related but I built everything to test on my .net web domain and then launched the .com yesterday. I checked the .net version and its the same.
Stick
Tropos
Tropos
 
Posts: 14
Joined: Thu Mar 15, 2012 6:44 pm

Re: Suddenly - Everything is Accesable

Postby Michael » Wed Mar 21, 2012 10:20 am

Hi,

The Nice Content Access does not alter permissions. It simply checks the user's user group id(s) and looks to see if there is a match to its "allowed" user groups. If it finds a match it displays the allowed content, if not, it displays the alternative content (if any). That's it. It doesn't apply or remove permissions (or user groups) in any way.

So, I am not sure how your page permissions would have been changed overnight. On the other hand, I have had my share of late night development sessions, where I woke up the next day to find things different than I expected or remembered.

~ All the best
Contributed by Michael Babcock
User avatar
Michael
Cosmos
Cosmos
 
Posts: 2473
Joined: Thu Aug 14, 2008 12:30 am

Re: Suddenly - Everything is Accesable

Postby Stick » Wed Mar 21, 2012 11:16 am

I have no idea what could have happened over night. It was literally fine all day yesterday and then I could access everything publicly.

It is related to the groups. I can't exactly figure out what is going on and don't feel like typing it all up to be honest. I can pick certain groups to have access and it works but then opens it to the public. I had a "comp" group for some of my free memberships that seems to lock everything out like it was so I am just redirecting my memberships and re-categorizing the articles. Seems to work.
Stick
Tropos
Tropos
 
Posts: 14
Joined: Thu Mar 15, 2012 6:44 pm

Re: Suddenly - Everything is Accesable

Postby Michael » Wed Mar 21, 2012 11:44 am

Hi,

Wow, that's different. Sometimes in the past, I have restored a site or moved a site and accidentally used an SQL file that predated changes I made. Of course on first inspection everything appears fine. But, sometime down the road, I would inevitably notice that the changes I made were not present. Generally, I would be able to back trace my steps, which would lead to the discovery that I mistakenly used the wrong SQL file in the restore.

AS far as page permissions go, none of my extensions operate on those parameters. Nice Memberships comes the closest. However, it simply adds and removes user group ids to user accounts. It leaves all the page permission stuff to Joomla (as it should be in my humble opinion).

In any event, I am glad that you where able to rework your pages and get the situation resolved.

~ All the best
Contributed by Michael Babcock
User avatar
Michael
Cosmos
Cosmos
 
Posts: 2473
Joined: Thu Aug 14, 2008 12:30 am

Re: Suddenly - Everything is Accesable

Postby Michael » Mon Jul 23, 2012 2:29 pm

Okay Brother,

I tore through this issue over the weekend and I am happy to say that I have resolved the NCA issue on your site. What was happening, you ask?? Well, I am not entirely sure. However, this is what I do know.

1. Your Public user group had 1 user assigned to it. I noticed on my test sites that no users are assigned to Public. Now, I was not able to locate this user on your site. But, I could see them in the user group tally (Users>>User Groups).

2. When a visitor is on the site and is not logged in, they have a user id of 0 (zero). When the extension looks up the user's user groups it passes the user id to the database. Now normally for a Public visitor with an id of 0, the database would say, "Hey, wait a sec, there is no user with and id of 0". So, then the extension would build a false record for the visitor. This false record then tells the extension that the user is not allowed to see the premium content.

However, on your site, when the extension looks up the Public visitor, the database finds a record and tells the extension that the user id 0 belongs to your two premium user groups. What, what??

I didn't have database access for your site, so, I didn't explore the mystery "Public" user. Instead I simply told the extension to not even bother looking up the user in the database if their id is 0. Now, every thing seems to work!

I am creating a new version of the extension 1,04. It will contain the changes I made for your site. So, when you upgrade, you won't have to worry about the changes reverting back.

~ Enjoy!
Contributed by Michael Babcock
User avatar
Michael
Cosmos
Cosmos
 
Posts: 2473
Joined: Thu Aug 14, 2008 12:30 am


Return to Joomla: Nice Content Access

Who is online

Users browsing this forum: Google [Bot] and 1 guest