Comments (9)
@Nerdylicious @rosariorobinson @tapasweni-pathak Please add any history on what is the unique user identification parameter or the desired unique identifier.
@jayesh92, @vubo My understanding is the project uses django.contrib.auth.models
User objects.
django.contrib.auth.models
uses username as a required identifier unless overridden as a custom user model.
https://docs.djangoproject.com/en/1.8/topics/auth/default/
https://docs.djangoproject.com/en/1.8/ref/contrib/auth/#django.contrib.auth.models.User
Overall, it probably makes sense for this to have better documentation of the model:
https://github.com/systers/vms/blob/0190b907673f638c21ef3bc1673bfcc3c1a4735e/vms/volunteer/models.py#L102
from vms.
@willingc Yes, as the project uses django.contrib.auth.models, the unique identifier is username.
I don't feel it should be like this, every user of vms (volunteers) should have a unique username and email id. Later, if we added some features which uses the uniqueness, it may create a problem.
Once someone registered with a email id and a username, the email id should not be allowed to used again.
@rosariorobinson @Nerdylicious can suggest better.
from vms.
@tapasweni-pathak While the email can be checked and set as unique, I don't believe that it should be the primary ID of uniqueness for a volunteer. Many people have multiple email addresses and down the road the volunteer management system may have to support a user's multiple contact preferences.
I think it is best to use the django default of username as the unique identifier since core Django can take care of much of the user checking without having to write our own.
There should be a check that an email can not be committed to the database if any other user has that email in the database.
from vms.
@willingc I think I was not able to explain myself properly.
While the uniqueness check should be on the username but the email id should not be allowed to be reused again for some other username. The same thing that you are saying. 👍
What I meant with adding some features using this is, if someday we wanted to support search for a volunteer using her/his mail id. One mail id should reference one username and a user can ofcourse have multiple mail ids. From mail id to username, it should be M:1 relationship and M >= 1.
Once someone registered with a email id and a username, the email id should not be allowed to used again. That's why I said it should not be like this, we should have one check on the reuse (not allowed) of email id for different username.
from vms.
@tapasweni-pathak 👍 Yes, we are in agreement. Sorry I didn't understand this from the earlier comment 🍰
from vms.
from vms.
Definitely a data model error to allow the same email address for multiple usernames (IMO). I have been on a project in the past where they changed the unique identifier from user id to email addresses to address issues that arose.
from vms.
@jayesh92 thanks for opening an issue.
@willingc @tapasweni-pathak @galarnyk thank you for the discussion and help. I added unique=True to the email field in the PR #84
from vms.
I think, now this issue can we closed.
from vms.
Related Issues (20)
- Upgrade Django to 3.0.9(latest) HOT 20
- Fix binary string in the URL on the email verification HOT 6
- Add badges to the Readme File for codecov HOT 9
- Fix the unable to locate element error HOT 19
- [Feature] Add Hide/show toggle feature for all password fields HOT 30
- Country, State & City field must be a dropdown in Volunteer Signup HOT 7
- Resize-able Text area in Sign-Up Volunteer HOT 7
- Fix some failing test cases HOT 14
- Bug: Set Top margin of main container HOT 4
- Step by step guide for absolute beginners to contribute HOT 10
- fix label error in sign up
- Setup and run HOT 2
- Bug: Error when registering as admin HOT 7
- Readme for Open Source Hack HOT 2
- Bug: Email Confirmation link is not correct HOT 2
- Dependabot couldn't authenticate with https://pypi.python.org/simple/
- Add toggling effect on buttons HOT 5
- Deploy to Heroku and write instructions on how to do that HOT 12
- blog: OSH Experience HOT 6
- Admin account activation URL is not working HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vms.