How can I deny users changing records

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default How can I deny users changing records

    Hi All,

    I have an Access db which has a LoginCheck table.
    I use this table to login with name and password.
    But there is also in the table a field right which can be
    "read" or "write".
    I want to be able to use this field so users which can may
    only "read" do not enter a page where a record can be edited.

    I use the following code in each page.

    Response.Expires = -1000 'Makes the browser not cache this page
    Response.Buffer = True 'Buffers the content so our Response.Redirect will work
    If Session("UserLoggedIn") <> "true" Then
    Response.Redirect("login.asp")
    End If

    Now I need some code that when a user wants to go to the edit-page
    and his rights are only "reading", he cannot get in.

    Regards,

    MArco
    The Netherlands
    Krechting Guest

  2. Similar Questions and Discussions

    1. Changing 'sitename' for all users
      Hi folks, Sorry to bother you. I am an administrator of a number of sites which I inherited. We have a lot of Contribute users who have access...
    2. Restrict users from changing roles
      Is there a way to restrict users from changing roles themselves? If a user goes to My Connections and then clicks Edit, they could, in theory,...
    3. new users / records since last login?? - help needed..!
      Hi - using APS/Acsess/Vbscript How can I display the total new users/records in a table since last time i logged in on a member page. Help...
    4. Forms Authentication - "Deny users = ?" necessary
      Thanks for your reply Hernan. I can't believe Authentication and Authorization are mixed... If I want to identify/authenticate a user (for...
    5. Changing X resources settings for CDE users
      On Mon, 30 Jun 2003 22:21:58 +0000, Akop Pogosian wrote: How about /usr/dt/config/C/Xresources? It also seems to meet the criterion of being...
  3. #2

    Default Re: How can I deny users changing records

    May be a better and more grace full idea is to still view page but not able
    to edit

    Read in read/write field and if its readonly set a session variable to
    "readonly"
    then swap the submit button text for the session variable.

    <%
    'Allows user to view but not perform any Data Insert & Update Functions
    (ie. They can look but not change)
    If Session("editaccess") = "0" Then
    sReadOnly = "readonly"
    sChangeButtonState = "&nbsp;ORDERING DISABLED"
    Else
    sReadOnly ="submit"
    sChangeButtonState = "PLACE ORDER >>"
    End If
    %>

    'Button line in form
    <td nowrap><input type="<%=sReadOnly%>" value="<%=sChangeButtonState%>"
    name="btnCheckout" class="cmdflat"></td>

    Regards
    Don


    "Krechting" <m.krechting@chello.nl> wrote in message
    news:a71c776d.0312241342.5294664e@posting.google.c om...
    > Hi All,
    >
    > I have an Access db which has a LoginCheck table.
    > I use this table to login with name and password.
    > But there is also in the table a field right which can be
    > "read" or "write".
    > I want to be able to use this field so users which can may
    > only "read" do not enter a page where a record can be edited.
    >
    > I use the following code in each page.
    >
    > Response.Expires = -1000 'Makes the browser not cache this page
    > Response.Buffer = True 'Buffers the content so our Response.Redirect will
    work
    > If Session("UserLoggedIn") <> "true" Then
    > Response.Redirect("login.asp")
    > End If
    >
    > Now I need some code that when a user wants to go to the edit-page
    > and his rights are only "reading", he cannot get in.
    >
    > Regards,
    >
    > MArco
    > The Netherlands

    Don Grover Guest

  4. #3

    Default Re: How can I deny users changing records

    If Session("UserCanReadOrWrite") <> "write" Then
    Response.Redirect("login.asp")
    End If

    Best regards,
    J. Paul Schmidt, Freelance ASP Web Developer
    [url]http://www.Bullschmidt.com[/url]
    ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...


    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Bullschmidt Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139