This topic is locked

Advanced Security on list page

7/27/2006 6:20:09 AM
ASPRunnerPro General questions
A
abdemir author

Hi,
We keep our sales details on the web site. I setup step 9 of 12 with following parameters. Sales Represents can see and edit their own REGION records.
Username and password from database

-------------------------------------------------

Table :tbl_users

Username field :tbl_users_username

Password field :tbl_users_password
Advanced....

---------------

"Users can see edit their own data only"
Users Table: OwnerID field

------------------------------

tbl_users_region
Main Table: OwnerID field

-----------------------------

tbl_sales_region
It's great works until right now. Because Sales department want to increase a security today.

  • All "Sales Represent" users can see and edit their own data only (not all regions data)
  • "Regional Manager" users can see and edit their OWN REGION data only
    I changed ..._list.asp, ..._aspfunctions.asp files, however I couldn't solve this complex security. What can I do for two restirictions on the list page?
    Best Regards,

    Bulent
    TABLES INFORMATION
    tbl_users

    ---------

    tbl_users_id

    tbl_users_username

    tbl_users_password

    tbl_users_fullname

    tbl_users_region

    tbl_users_title
    Example Records

    --------------------

    1 | fantom | password | Sergey | Europe | Sales Represent

    2 | batman | password | Terry | Asia | Sales Represent

    3 | td | password | Tommy | Asia | Sales Represent

    4 | dallas | password | David | Europe | Sales Represent

    5 | supergirl | password | Nicy | Europe | Regional Manager

    6 | zagor | password | Michael | Asia | Regional Manager
    tbl_sales

    ---------

    tbl_sales_id

    tbl_sales_user

    tbl_sales_region

    tbl_sales_date

    tbl_sales_price

    tbl_sales_amount

    tbl_sales_date

Alexey admin 7/27/2006

Hi,
I recommend you to create two ASPRunner projects and put them to different folders on your site.

One would be for Sales Represents and other - for Regional Managers
Use tbl_users_id - tbl_sales_user pair of OwnerID fields for the first project and tbl_users_region - tbl_sales_region for the second.

A
abdemir author 7/27/2006

Hi Alexey,
May I apply the filter or special SQL Select on the login.asp?
if rs("title") <> "Regional Manager" then

sql filter command......(I dont known)

end if
Best Regards,

Alexey admin 7/27/2006

Hi,
you can add your filtering expression just after this snippet in generated login.asp file:

strSQL = "select * from " & cLoginTable & " where " & AddWrappers(cUserNameField) &

"=" & strUsername & " and " & AddWrappers(cPasswordField) &

"=" & strPassword


I.e. add this line:

srtSQL =strSQL & " and title='Manager'"