Key-Cabinet is a secure, role-based key management system designed to ensure only authorized users can access specific keys. After successful authentication, users can view all keys but access only those keys which they are authorized to use. The system also includes an admin panel where administrators can manage users, roles, permissions, and keys. This system is ideal for organizations looking to manage physical key access securely.
- Role-Based Access: Users can only access keys that are authorized for their roles.
- Admin Panel: Admins can manage users, roles, keys, and permissions from a secure backend.
- User Authentication: Secure login ensures that only authenticated users can access the key management system.
- Key Access Control: Users can view, take, and return keys based on their permissions.
- Permission Management: Permissions are assigned to roles, allowing fine-grained control over which users can access specific keys.
The system enforces login authentication to ensure only authorized individuals can access the keys cabinet. Credentials are securely stored in the database, and users are granted access based on their assigned roles.
- Restricted Access: Users can access keys only if they have the required permissions.
- Roles & Permissions: Admins can create roles and assign permissions to control who can access which keys.
Admins can perform CRUD operations (Create, Read, Update, Delete) on:
- Users: Manage who can log in to the system.
- Keys: Add or remove physical keys.
- Roles: Define roles like staff, manager, etc.
- Permissions: Control what actions (e.g., view, take, return) users can perform on keys.
- User-Role Mapping: Assign roles to users to define their access levels.
The system uses a relational database with the following tables:
- Users: Stores user credentials.
- Access: Tracks key access records.
- Keys: Stores information about the available keys.
- Permissions: Manages which roles can access which keys.
- Roles: Defines various roles in the system (e.g., staff, admin).
- User Roles: Maps users to their respective roles.
Download and install Python from the official website:
- Python Downloads
- Verify installation by running
python --version
orpython3 --version
in the terminal.
Use pip
to install Django:
pip install django
Navigate to the project directory and run the server:
python manage.py runserver
The server will start at localhost:8000
.
Admins can access the admin panel at localhost:8000/admin
using:
- Username:
admin
- Password:
admin
Log in with the following credentials for read-only access to the admin panel:
- Username:
staff
- Password:
testuserforapp
- Add new users and assign them roles through the admin panel.
- Add keys and assign roles with the appropriate permissions to control access to each key.
- User Login: After authentication, users can access keys assigned to their roles.
- Admin Panel: Admins can add, remove, or update users, roles, and keys.
- Assign Keys: Admins assign keys to roles in the admin panel.
- Access Keys: Users can view, take, and return keys based on their permissions.