Forums | Mahara Community

Support /
Duplicates in view_access table?


anonymous profile picture
Account deleted
Posts: 131

24 October 2011, 9:43

Hi,

I'm doing a database query to find public content in my Mahara system.

I've noticed that there are multiple entries for some views in the view_access table. For example I have two entries for view 371. They are identical except for 'accesstype'. One row has a 'public' accesstype, the other a 'loggedin' accesstype.

Is this an error? If not, how can I ascertain whether view 371 has public or loggedin access?

Thanks,

Mike

anonymous profile picture
Account deleted
Posts: 214

24 October 2011, 16:53

Hi Mike, This is completely normal. A page/view can have several sharings at the same time. These are different types - loggedin only allows logged in users, and public allows anyone. A user might choose to remove one or other of the sharing settings, or have them time limited. Andrew
anonymous profile picture
Account deleted
Posts: 131

25 October 2011, 3:54

Hi Andrew,

OK, thanks. Do you know where would I look in the db to find a view's access settings for a non logged-in visitor?

Mike

anonymous profile picture
Account deleted
Posts: 131

25 October 2011, 4:52

OK, I presume that if a public accesstype entry exists, in theory it should trump all other permissions, and the view should be accessible to all.

However, it doesn't always seem to work that way. My database query for public views finds a user's profile page with entries for both public and loggedin access. I don't see how that could have been set, as access to profile pages is just a toggle control.

Also, the profile page is set to be public, but when logged out I can't access it.

Mike

4 results