|
Ramapo Masters of Science Tools and Concepts of Data Analysis: Dataweb Adding Password Protection to Your Site (home) Overview
| Download Current Database | Adding
Tables to the Database
Overview: Password Protection The information you collect through your website is often more valuable than the site itself. When collecting data you take on responsibility for the security of that information. In most cases users who provide such information have the expectation that it will be kept private and secure. If you intend to make this data public you should make this fact known before information is collected. Since we will be creating web pages to view the information collected, we will need to provide a secure method of viewing it by protecting those pages through a password protection system. Downloading the Current Database By this point in the process we have added a bit of test data to the database. This information likely exists only in the copy of the database that resides on the server - not on the local copy stored on your flash drive. In order to add password protection to this site, we will need to make changes to the database and send the revised copy to the server. If we do this without first downloading the data already collected, we will lose it. It is for this reason that we must bring down a copy of the remote database before making revisions. Then when the revised database is sent back to the server, the data will be included. In order to download the current database from the server:
Adding a Login Table to the Database In order to create a password protection systems we must create a table in the database that contains the usernames and passwords of those users allowed to access password protected areas of the site. If such a table does not already exist:
In order for designated users to access restricted pages, they must know a username and password combination that exists in the database. The users must pass through a login page to verify that they possess the correct information. To create such a page:
Now we must create a form to check the users username and password against the database. We will create the form, create a table to position the form elements, create the form elements including a submit button, and use a wizard to create the rest of the login procedure.
Click inside the form | Insert | Table Set the table:
In the property pane,
In the property pane,
Now use the wizard to create a login
The first section gives the form name and the names of the form elements you have created on the page.
If the user logs in successfully they will be redirected to another page.
If the user fails during the login they will be redirected to another page.
To test the page, view it in the browser and attempt to log in using the incorrect username and/or password. You should be redirected to the same login page. Now attempt to log in again using a correct username/password combination. You should be redirected to your query control page. Adding Password Protection to a Page In order to password protect a page, you must first have created a login page as described above. To add password protection to a page: Open the page Insert | Data Objects | User Authentication | Restrict Access To Page
To test the page, first log in, proceed to the page and add it to your favorites in Internet Explorer (favorites | Add to Favorites). Next close all copies of Internet Explorer completely. Reopen Internet Explorer and attempt to get to the page using the bookmark you created in favorites (Favorites | click on the text that indicates the page you just added). You should be redirected to the login page. Adding Access Levels to a Login Scheme Adding an access level parameter to your login scheme would allow you to grant access to particular pages of a website based on an access level assigned to each user. This can be a very useful feature. You may for example want to share some pages with fellow teachers but limit others so that you alone can access them. To modify an existing login scheme to add access level: Create an Access Level field in the database table containing login information
Modify the login scheme on the login page
Modify the login scheme on each protected page to limit/allow access
Site Designed and Maintained by rsciorra |