-
Notifications
You must be signed in to change notification settings - Fork 6
Specification
There are three types of users.
-
Super user: Super user can do anything including administration tasks and purchasing.
-
Store owner: Store owner can do some sort of administration tasks tasks and purchasing.
-
Buyer: Buer can only do purchasing.
The main table storing users is store_user table (you can see ER diagram). Store owner has a record in site_user table. The following table shows three types of users and database record.
| User type | store_user record | site_user record |
|---|---|---|
| Super User | user_role=0 | none |
| Store Owner | user_role=1 | yes |
| Buyer | user_role=1 | none |
The application supports employee users. Sites for employees are not for everyone and need login to browse. In this case, the user id of employee should be in format "n-xxxxxx" where n is site id (surrogate key of site table).
If the first_name column of store_user is left blank, the user will be redirected to user registration form when the user log in to the site.