Skip to content

Conversation

@snehas-05
Copy link

@snehas-05 snehas-05 commented Oct 14, 2024

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

@Devasy
Copy link
Owner

Devasy commented Oct 15, 2024

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 Devasy closed this Oct 15, 2024
@snehas-05
Copy link
Author

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

@devansh-shah-11
Copy link
Collaborator

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!

@Devasy
Copy link
Owner

Devasy commented Oct 15, 2024

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

@snehas-05
Copy link
Author

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

@devansh-shah-11
Copy link
Collaborator

Already assigned in Issue #87

@snehas-05
Copy link
Author

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

@devansh-shah-11
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants