Homework 5 (Users and Permissions)
Due Mar 28, total of 100 points
Description
In this assignment, you will implement user authentication and authorization features for your grading application, ensuring that different user types (students, TAs, and administrators) have appropriate access and permissions:
- Set up user authentication using Django's built-in authentication system
- Implement log-in and log-out functionality
- Define and apply permission sets for different user roles
Your tasks include:
- User Authentication:
- Identify the current user
- Implement secure login and logout functionality
- Permissions and Access Control:
- Define permissions for each user role
- Implement view-level permissions (e.g., only TAs can grade assignments)
- Add object-level permissions (e.g., students can only view their own submissions)
- Integration:
- Update existing views to respect user permissions
- Modify templates to show/hide elements based on user role
Note: Ensure that all sensitive operations are properly secured and that user data is handled safely.