This topic is locked

Advanced security giving me problems

1/31/2008 4:32:15 AM
PHPRunner General questions
S
Sinbad author

Hi
I have a table _Users

+--------------------+--------------+------+-----+---------+----------------+

| Field | Type | Null | Key | Default | Extra |

+--------------------+--------------+------+-----+---------+----------------+

| ID | int(11) | NO | PRI | NULL | auto_increment |

| UID | varchar(50) | YES | | NULL | |

| Name | varchar(50) | YES | | NULL | |

| Group | varchar(50) | YES | | NULL | |

| Email | varchar(100) | YES | | NULL | |

| Password | varchar(50) | YES | | NULL | |

| CreatedByPHPRunner | int(11) | YES | | NULL | |

+--------------------+--------------+------+-----+---------+----------------+


and _TimesheetEntry

mysql> desc _TimesheetEntry;

+--------------------+---------------+------+-----+---------+----------------+

| Field | Type | Null | Key | Default | Extra |

+--------------------+---------------+------+-----+---------+----------------+

| ID | int(11) | NO | PRI | NULL | auto_increment |

| Date | date | YES | | NULL | |

| UID | varchar(50) | YES | | NULL | |

| PID | int(11) | YES | | NULL | |

| CreatedByPHPRunner | int(11) | YES | | NULL | |

| AID | int(11) | YES | | NULL | |

| Duration | decimal(32,0) | YES | | NULL | |

+--------------------+---------------+------+-----+---------+----------------+


I tried to set TimesheetEntry to have users only see their own data.

I selected "UID" in both dropdowns on the Advanced security dialog.


Now when a user tries to create an entry, their UID does not get populated into the DB - it goes in as a "blank" and that user can only see entries with a blank UID.

mysql> select * from _Users

->;

+----+--------+----------------+----------------+------------------------+----------+--------------------+

| ID | UID | Name | Group | Email | Password | CreatedByPHPRunner |

+----+--------+----------------+----------------+------------------------+----------+--------------------+

| 1 | utgsxh | Steven Haywood | Administrators |xxxx | xxxx | NULL |

| 2 | utgjxb | Jacques Beyers | Users | xxxx | xxxx | NULL |

+----+--------+----------------+----------------+------------------------+----------+--------------------+

2 rows in set (0.00 sec)
mysql> select * from _TimesheetEntry;

+----+------------+--------+------+--------------------+------+----------+

| ID | Date | UID | PID | CreatedByPHPRunner | AID | Duration |

+----+------------+--------+------+--------------------+------+----------+

| 1 | 2008-01-30 | utgsxh | 7 | NULL | 3 | 4 |

| 8 | 2008-01-30 | | 2 | NULL | 4 | 1 |

| 7 | 2008-01-30 | utgjxb | 7 | NULL | 1 | 1 |

| 6 | 2008-01-30 | | 3 | NULL | 1 | 1 |

| 9 | 2008-01-31 | | 3 | NULL | 1 | 2 |

| 10 | 2008-01-31 | | 3 | NULL | 1 | 1 |

| 11 | 2008-01-31 | | 5 | NULL | 2 | 1 |

| 12 | 2008-01-31 | | 3 | NULL | 3 | 2 |

| 13 | 2008-01-31 | | 3 | NULL | 3 | 3 |

| 14 | 2008-01-31 | utgjxb | 6 | NULL | 3 | 2 |

+----+------------+--------+------+--------------------+------+----------+

10 rows in set (0.00 sec)


User utgjxb is the one in question - the entries in there with UID were created when I set "see and edit all users data" for that table.


I must have done something stupid - what is it please? <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=7417&image=3&table=forumtopics' class='bbc_emoticon' alt=':)' />
Thanks!!

Steven

J
Jane 1/31/2008

Hi,
it's difficult to tell you what's happening without seeing actual files.
Please publish your project on Demo Account and send to support@xlinesoft.com 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
illi 4/3/2008

I'm having this same type of problem. Was there any resolution to this?
Thanks!

J
Jane 4/4/2008

Hi,
it's difficult to tell you what's happening without seeing actual files.
Please publish your project on Demo Account and send to support@xlinesoft.com 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.