This topic is locked

security issue

6/8/2007 7:12:15 AM
PHPRunner General questions
C
clare author

Hi,
I have three tables, client, branches, and users

and I have table of employees.
How can I setup single login for both employees and users? <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=5459&image=1&table=forumtopics' class='bbcemoticon' alt='<<' />
Should I put employees and users in one table?

If so I need the manger of the users for specific client for specific office to add/edit new users for her office <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=5459&image=2&table=forumtopics' class='bbc_emoticon' alt=':blink:' />
Merci,
Clare

C
clare author 6/8/2007

I think I failed to explain <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=18696&image=1&table=forumreplies' class='bbc_emoticon' alt=':(' />
Well I'll try again,
I have some clients and each client has more than one branch and in each branch there are more than one user, I need a way to set up user privileges so that I have three levels:
1 Client Manager:Can view/edit/add any data related to her or her branches or her users.

2 Branch Manger: Can view/edit/add any data related to her branch or her users in that branch.

3 User: can view/edit her own data.
My database has: a table for client information, a table for branch information, and table of users.
All these users should be in one table with employees (four table), isn't?
Any suggestion?
Many thanks,
Clare

M
michaelmac 6/9/2007

I think I failed to explain <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=18724&image=1&table=forumreplies' class='bbc_emoticon' alt=':(' />

Well I'll try again,
I have some clients and each client has more than one branch and in each branch there are more than one user, I need a way to set up user privileges so that I have three levels:
1 Client Manager:Can view/edit/add any data related to her or her branches or her users.

2 Branch Manger: Can view/edit/add any data related to her branch or her users in that branch.

3 User: can view/edit her own data.
My database has: a table for client information, a table for branch information, and table of users.
All these users should be in one table with employees (four table), isn't?
Any suggestion?
Many thanks,
Clare


Hi Clare
I have done it. You need TWO keys to maintain the configuration you desire. Here is were I started. I set up my password table with a userID, a password, a billToID (your client manager), and a shipToID( for both your branch and user). I also used the GroupID just pretty much the way you have it. I have "admin"=client manager, "manager"=branch and "user"=user.. The two projects approach worked the best. I set the login at the /User directory. I used the aftersuccessful event to check the GroupID. If the user was a "admin", I switched to the /Admin directory. Since I made the project identical with the exception of how I did the links, for what filter what, I got it working in no time.
I hope that helps
Mike

C
clare author 6/9/2007

Hi Mike,
Thank You, You are really nice <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=18725&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />
I just want to say that I need client manger to edit all her users, and in same time user edits only her data.
It sounds that the privilege is not on user ID (in this case as I already chose user edit her data only), and in same time to make 3 projects sounds a bit redundant because I have three levels, client manager, branch manger, and user. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=18725&image=2&table=forumreplies' class='bbc_emoticon' alt=':blink:' />
It also sounds a bit complicated for the tables which have no user ID but require user in somehow, don't tell me to add user ID to each table please. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=18725&image=3&table=forumreplies' class='bbc_emoticon' alt=':ph34r:' />
Clare

M
michaelmac 6/9/2007

Hi Mike,

Thank You, You are really nice <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=18729&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />
I just want to say that I need client manger to edit all her users, and in same time user edits only her data.
It sounds that the privilege is not on user ID (in this case as I already chose user edit her data only), and in same time to make 3 projects sounds a bit redundant because I have three levels, client manager, branch manger, and user. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=18729&image=2&table=forumreplies' class='bbc_emoticon' alt=':blink:' />
It also sounds a bit complicated for the tables which have no user ID but require user in somehow, don't tell me to add user ID to each table please. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=18729&image=3&table=forumreplies' class='bbc_emoticon' alt=':ph34r:' />
Clare


hey clare
thank you for your comment..
in your password table you need these items to make this work
userID -- so they can logon ---- this will have to be UNIQUE

password -- obvious

billToID --- for your district.. this will not have to be unique

shipToID -- for your individual store--will be UNIQUE, but only to the stores.. I made them increment as I added individual stores

GroupID -- 'admin' for the district, 'manager' for the store, 'user' for that store also
now I did discover the project template. ask about it since I have never used it..
You have to first set up your password table as I showed..
then you need to design and put in your inventory first.. then orders and then billing
then make your project.. I called my users..
be aware you will need to make several passes to make this work.. it is tedious, but the final product is GREAT!!!
then those item in your orders/invoicing will need this billToID-shipToID link always
you will not need it for inventory, as those will be written to orders and billing
now you may want to consider a link between inventory and vendor, but that is up to you
I hope this helps
Mike