Home arrow Zope arrow Flat User Management in Zope

Flat User Management in Zope

Many applications are surprisingly easy to create in Zope. This article will teach you how to create a simple user database using Zope objects for data storage.

TABLE OF CONTENTS:
  1. Flat User Management in Zope
  2. Registration
  3. Login
  4. Verification
By: Peyton McCullough
Rating: starstarstarstarstar / 9
February 07, 2005

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

Introduction

Today, many websites feature a database of users. Viewers can register accounts required to access privileged areas of the website. For example, a clan could reserve pages on game tactics for members of the clan, rather than anyone and everyone who just might happen to come across their page.

This article will teach you how to create a simple user database using Zope objects for data storage rather than a relational database. You will learn how to create a registration system, a login system and a verification system to handle access to privileged pages. We will use Zope Page Templates and Python to do this.

The Blueprints

First, we will build a registration system. Users will access the registration Zope Page Templates and fill out a form with their desired username and password. After submitting the form, the data will be handled by a Script ( Python ) object. The script will check to see if the username submitted already exists. If it doesn't, a file will be created with the user's username as the filename. A password property will be added to the file containing their hashed password.

A login system will then need to be built. Users will access the login Zope Page Template and enter their username and password in a form. When they submit the form, their username and password will be sent to a Script ( Python ) object, which will try it against the username's file. If the correct password is provided, two cookies will be set: a cookie containing the user's username and a cookie containing the user's hashed password.

When a user attempts to access a private page, the username and password provided in their cookies will be tried against the username's file. If the password matches, the user will be permitted to access the file.



 
 
>>> More Zope Articles          >>> More By Peyton McCullough
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

ZOPE ARTICLES

- Creating Zope Products
- Plone Content Types With Archetypes
- Flat User Management in Zope
- Creating Basic Zope Applications
- Getting started with Zope for Linux and Sola...
- ZPT Basics (part 4)
- ZPT Basics (part 3)
- ZPT Basics (part 2)
- ZPT Basics (part 1)
- Exception Handling In DTML
- DTML Basics (part 4)
- DTML Basics (part 3)
- DTML Basics (part 2)
- DTML Basics (part 1)
- Using Zope With Apache

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: