This topic is locked

Add new only for Admin

2/27/2004 9:27:33 AM
ASPRunnerPro General questions
D
DNS Hosting author

So how can i set it so that only admin can add new records..
Happy for users to edit their own detail but dont want them to be able to add new items

Sergey Kornilov admin 2/27/2004

Hi,
here is how you can do this if you use "Admin login" feature:
Find Function CheckSecurity(strValue, strAction) at the end of

..._list.asp file and add the following snippet of code at the

beginning of this function:

 

if strAction="Add" then

    if Session("AccessLevel")=ACCESS_LEVEL_ADMIN then

        CheckSecurity = True

    else

        CheckSecurity = False

    end if

    Exit Function

  end if