LLD for user permissions in a hierarchal relationship.
- Install the requirements.txt file.
- Go to shell,
python manage.py shell
, and execute following commands,
from user.models import CustomUser
user = CustomUser.objects.last()
user.my_permissions()
- Database is included for the convenience, spin-up the server and login with,
id:pass -> admin:admin
- Change the level of the user to Plant or Company or HeadQuater and check the users permissions by executing commands in step 2.