FaceRec icon indicating copy to clipboard operation
FaceRec copied to clipboard

Main

Open snehas-05 opened this issue 2 years ago • 8 comments

I have implemented the User Authentication and Role Management feature in the project. This includes secure user registration, login functionality, and role-based access control. Users can now be assigned different roles (e.g., admin, regular user), and the functionality of certain views is restricted based on user roles. An admin dashboard has also been created, which is accessible only by admin users. I have added my code in a separate folder named as user_authentication for better understanding. Also, I have made necesarry changes in the file settings.py of face recoginition folder.

Instructions for Setup: After merging this pull request, you will need to follow these steps to apply the changes-

  1. Run Migrations: Apply the database migrations to create the necessary tables and fields for user roles and authentication. Command for that- python manage.py makemigrations python manage.py migrate

  2. Create a Superuser: To access the admin dashboard, you’ll need to create a superuser account. You can do this by running the following command: python manage.py createsuperuser

  3. Run the Development Server: Start the server and test the authentication and role management features by the command: python manage.py runserver

I wanted to mention these instructions to ensure a smooth workflow. I know you’re familiar with these steps, but I thought it might be helpful to have them documented here. If you have any questions or need further clarification, feel free to reach out. Thank you! Therefore, I now request you to merge my code. I will be grateful to you!

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [✓ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] This change requires a documentation update

Checklist:

  • [✓ ] My code follows the style guidelines of this project
  • [✓ ] I have performed a self-review of my own code
  • [ ✓] I have commented my code, particularly in hard-to-understand areas
  • [✓ ] I have made corresponding changes to the documentation
  • [✓ ] My changes generate no new warnings
  • [✓ ] I have added tests that prove my fix is effective or that my feature works
  • [ ✓] New and existing unit tests pass locally with my changes
  • [✓ ] Any dependent changes have been merged and published in downstream modules

snehas-05 avatar Oct 14 '24 17:10 snehas-05

Hi @snehas-05 , really appreciate your efforts but to my utter dismay we don't need Django for this as this project already has FastAPI for the backend and Flask for the frontend. So this PR won't be accepted. Please consult a mentor or project admin before moving on with your task else your precious time and efforts may get wasted

Devasy avatar Oct 15 '24 16:10 Devasy

This is so heart wrenching as I had really put on efforts for this implementation.

snehas-05 avatar Oct 15 '24 16:10 snehas-05

Hi @snehas-05, We appreciate your efforts and the idea is also good. Can you implement the same in FastAPI + Flask? If so, we can assign you the task and give the relevant gssoc labels!

devansh-shah-11 avatar Oct 15 '24 18:10 devansh-shah-11

Hi @snehas-05, We appreciate your efforts and the idea is also good. Can you implement the same in FastAPI + Flask? If so, we can assign you the task and give the relevant gssoc labels!

That could be easily integrated with our existing code without many changes that could mess up the architecture. If are willing to do that we'll be happy to guide you

Devasy avatar Oct 15 '24 19:10 Devasy

Hey yes for sure I will try my best. You can assign me the task

snehas-05 avatar Oct 15 '24 20:10 snehas-05

Already assigned in Issue #87

devansh-shah-11 avatar Oct 16 '24 05:10 devansh-shah-11

Hello @devansh-shah-11 @Devasy23 I have made the changes. Now do I need to create a separate pr?

snehas-05 avatar Oct 17 '24 09:10 snehas-05

Hi @snehas-05 - no, this pr will work. we will review and get back

devansh-shah-11 avatar Oct 17 '24 15:10 devansh-shah-11