This topic is locked

Difficulties with login as guest/unprivileged user groups

7/10/2007 13:32:07
PHPRunner General questions
P
Php_is_hard author

Hello,
I have searched, but there don't seem to be any similar problems.
My goal is to have an admin user group that can edit/delete and do everything else, and to have a read_only group that can simply view/search the records.
I have set the user permissions in the Security screen. I linked the users table and the main table.
When I log in as the admin, everything works perfectly fine. All the records are visible and editable.
The problem comes when I login as either the read_only group user or as the guest. For some reason, these can see the "Edit" and "Delete" and "Add" buttons. It would be fine if an error message like "Insufficient access rights." popped up when these were clicked. But, when they are clicked, the user is taken to the login screen and told that
"Your session has expired. Please login again. "
P.S. I have also set the security level to "users can see other users' data, but can only edit their own."

P.P.S. When I set it to "users can only see and edit their own data" no records were visible to the guest/read_only user group users, as it should be.

Thanks.

J
Jane 7/11/2007

Hi,
add or edit links doesn't appears for guests with readonly access.

Try to reset your pages on the Visual Editor tab and rebuild your project.
If it doesn't help publish your project on Demo Account and post send to [email=support@xlinesoft.com]support@xlinesoft.com[/email] a URL to your pages along with instructions on reproducing this error.

I'll find what's wrong with your project inspecting it at Demo account site.

P
Php_is_hard author 7/11/2007

Hi,

add or edit links doesn't appears for guests with readonly access.

Try to reset your pages on the Visual Editor tab and rebuild your project.
If it doesn't help publish your project on Demo Account and post send to [email=support@xlinesoft.com]support@xlinesoft.com[/email] a URL to your pages along with instructions on reproducing this error.

I'll find what's wrong with your project inspecting it at Demo account site.


I could reset the page, but would there be any way to keep the templates? (I spent a lot of time designing these, and it would be too time consuming to remake them).
For now, I'll try what you suggested on a backed up version of the project.

P
Php_is_hard author 7/11/2007

Jane: I did what you suggested. I backed it up, and then reset the List page. The security settings work now. Thank you.
As the next step, I changed the HTML of the page (in the visual editor, I pasted the layout that I want into the text editor.
I built the database, but the list page didn't change! it is still the default layout.
I then checked the list.htm page in the Templates folder, and the code in it was correct!
I was kind of surprised... Where else could the html code be coming from, if the page in the Templates folder is correct?
Thanks again.
Update: right now I am just trying to understand the fetch and _compile_resource functions in the smarty.class5.php file, but it is difficult... any help in figuring out where the other layout is coming from is appreciated.
Update 2: Ok, I managed to force it to use my old layout, but now the other bug has come back (guests see the edit/delete/add buttons). So then we've narrowed it down to the HTML encoding causing the difficulty (right?). I've uploaded the HTML encoding to here.

P
Php_is_hard author 7/13/2007

Ok, I solved it myself.