This topic is locked
[SOLVED]

  restrict surfing in a specific directory modifying cooki

11/22/2010 3:01:40 PM
PHPRunner General questions
M
matteofaini author

Hello.

I'm a teacher using PHPRUNNER for a school register.

Teachers do login in MYDOMAIN/teachers/login.php

Students do login in MYDOMAIN/students/login.php
I realized that if a student login in his page with his own username/password, and then changes in the brosers the web address, he is able to see the teacher interface. And since the teachers interface is set making teachers able to see all students data ("user can see and edit other user data"), the cunning student would be able to see other students data.

Obviously I set the "students" group unable to add data, but they can still view them.
Is that a way to restrict the surfing, maybe changing something in /include/cookies.js ???

What? How?

I tried with no success...
Thank you so much... PHPRUNNER is great!

Sergey Kornilov admin 11/24/2010

As a quick and dirty solution you can try to create a subdomain for each application and point it to corresponding directory i.e. http://teachers.MYDOMAIN.com/login.php and http://students.MYDOMAIN.com/login.php. Cookies and sessions won't be shared in this case.

M
matteofaini author 12/1/2010



As a quick and dirty solution you can try to create a subdomain for each application and point it to corresponding directory i.e. http://teachers.MYDOMAIN.com/login.php and http://students.MYDOMAIN.com/login.php. Cookies and sessions won't be shared in this case.


OK, I hav thought about that. The problem is that I have certain files (students pictures, classes pictures, teacher documents written by teacher for students) that HAVE to be shared. And If I divide webpages in two subdomain i loose this opportunity...

But thank you anyway...

Sergey Kornilov admin 12/1/2010

I'm not sure why you cannot share images having two projects on different subdomains. Probably you can elaborate this a little bit further.

M
matteofaini author 12/5/2010



I'm not sure why you cannot share images having two projects on different subdomains. Probably you can elaborate this a little bit further.


Ok you're right. I found the answer:

  1. For pictures uploaded by teachers (teacher's pictures), in the "teacher project" I have set a relative subfolder ("/teacherspictures"), while in the "students project" I have set the whole address ("http://teachers.mydomain.it/teacherspictures";).
  2. And the opposite procedure for the "students project".
    Thank you so much.