[Django] #30066: UserManager.create_superuser doesn't allow for omitting email or password, unlike create_user which does.

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

[Django] #30066: UserManager.create_superuser doesn't allow for omitting email or password, unlike create_user which does.

Django
#30066: UserManager.create_superuser doesn't allow for omitting email or password,
unlike create_user which does.
-------------------------------------+-------------------------------------
               Reporter:  Joshua     |          Owner:  nobody
  Cannon                             |
                   Type:  Bug        |         Status:  new
              Component:             |        Version:  2.1
  contrib.auth                       |
               Severity:  Normal     |       Keywords:  create_superuser
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  1
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 I couldn't find any historical information on whether or not this is
 intentional, but `create_user`/`create_superuser` seem to mirror each
 other except that `create_superuser` doesn't allow the caller to omit
 `email` and `password` parameters.
 [https://github.com/django/django/commit/fd2b99b5f122911b895987329507ee419a159a2c
 This commit] introduced omitting `password`, and
 [https://github.com/django/django/commit/f54135fa4dc9fd45d86ea2944191d58e00725779
 this commit] introduced omitting `email`, but neither touches
 `create_superuser`.

--
Ticket URL: <https://code.djangoproject.com/ticket/30066>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/053.b36e08a371816414ab60d919186880f6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #30066: UserManager.create_superuser doesn't allow for omitting email or password, unlike create_user which does.

Django
#30066: UserManager.create_superuser doesn't allow for omitting email or password,
unlike create_user which does.
-------------------------------------+-------------------------------------
     Reporter:  Joshua Cannon        |                    Owner:  Abhishek
                                     |  Bera
         Type:  Bug                  |                   Status:  assigned
    Component:  contrib.auth         |                  Version:  2.1
     Severity:  Normal               |               Resolution:
     Keywords:  create_superuser     |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Abhishek Bera):

 * owner:  nobody => Abhishek Bera
 * status:  new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/30066#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/068.d28a9701d3c964e68b719a8049f01c2e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #30066: UserManager.create_superuser doesn't allow for omitting email or password, unlike create_user which does.

Django
In reply to this post by Django
#30066: UserManager.create_superuser doesn't allow for omitting email or password,
unlike create_user which does.
-------------------------------------+-------------------------------------
     Reporter:  Joshua Cannon        |                    Owner:  Abhishek
                                     |  Bera
         Type:  Bug                  |                   Status:  assigned
    Component:  contrib.auth         |                  Version:  2.1
     Severity:  Normal               |               Resolution:
     Keywords:  create_superuser     |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Abhishek Bera):

 I added a test case with no email and password for the super user which
 failed. later i changed the code in the models to email = None and
 password = None in the contrib/auth/models createsuperuser params.

--
Ticket URL: <https://code.djangoproject.com/ticket/30066#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/068.0acf5cb9dc5d336a35a6c14a4f21800c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #30066: UserManager.create_superuser doesn't allow for omitting email or password, unlike create_user which does.

Django
In reply to this post by Django
#30066: UserManager.create_superuser doesn't allow for omitting email or password,
unlike create_user which does.
-------------------------------------+-------------------------------------
     Reporter:  Joshua Cannon        |                    Owner:  Abhishek
         Type:                       |  Bera
  Cleanup/optimization               |                   Status:  assigned
    Component:  contrib.auth         |                  Version:  2.1
     Severity:  Normal               |               Resolution:
     Keywords:  create_superuser     |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Claude Paroz):

 * has_patch:  0 => 1
 * type:  Bug => Cleanup/optimization
 * stage:  Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/30066#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/068.d1795b43eeafb3dbefca976968fa87cb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #30066: UserManager.create_superuser doesn't allow for omitting email or password, unlike create_user which does.

Django
In reply to this post by Django
#30066: UserManager.create_superuser doesn't allow for omitting email or password,
unlike create_user which does.
-------------------------------------+-------------------------------------
     Reporter:  Joshua Cannon        |                    Owner:  Abhishek
         Type:                       |  Bera
  Cleanup/optimization               |                   Status:  assigned
    Component:  contrib.auth         |                  Version:  2.1
     Severity:  Normal               |               Resolution:
     Keywords:  create_superuser     |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

 * needs_better_patch:  0 => 1


Comment:

 [https://docs.djangoproject.com/en/dev/topics/auth/customizing/#django.contrib.auth.models.CustomUserManager.create_superuser
 The documentation] says, The prototype of `create_superuser()` should
 accept the username field, plus all required fields as arguments." and
 "Unlike `create_user()`, `create_superuser()` must require the caller to
 provide a password."

 For the default user mode, `User.REQUIRED_FIELDS = ['email']` so that
 explains the original implementation. The documentation for
 `CustomUserManager.create_user()` wasn't updated after
 f54135fa4dc9fd45d86ea2944191d58e00725779. It still says, "The prototype of
 `create_user()` should accept the username field, plus all required fields
 as arguments." which is violated for the default case.

 I don't have a strong opinion about how to proceed but if we proceed with
 the changes, some documentation changes are required.

--
Ticket URL: <https://code.djangoproject.com/ticket/30066#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/068.680fd4fe0f12a7d9c6b53339ed3fec51%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #30066: UserManager.create_superuser doesn't allow for omitting email or password, unlike create_user which does.

Django
In reply to this post by Django
#30066: UserManager.create_superuser doesn't allow for omitting email or password,
unlike create_user which does.
--------------------------------------+------------------------------------
     Reporter:  Joshua Cannon         |                    Owner:  (none)
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  contrib.auth          |                  Version:  2.1
     Severity:  Normal                |               Resolution:
     Keywords:  create_superuser      |             Triage Stage:  Accepted
    Has patch:  1                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  1
Easy pickings:  1                     |                    UI/UX:  0
--------------------------------------+------------------------------------
Changes (by Abhishek Bera):

 * owner:  Abhishek Bera => (none)
 * status:  assigned => new


--
Ticket URL: <https://code.djangoproject.com/ticket/30066#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/068.e123b2cb133b81260482ee596048419d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #30066: UserManager.create_superuser doesn't allow for omitting email or password, unlike create_user which does.

Django
In reply to this post by Django
#30066: UserManager.create_superuser doesn't allow for omitting email or password,
unlike create_user which does.
--------------------------------------+------------------------------------
     Reporter:  Joshua Cannon         |                    Owner:  xurror
         Type:  Cleanup/optimization  |                   Status:  assigned
    Component:  contrib.auth          |                  Version:  2.1
     Severity:  Normal                |               Resolution:
     Keywords:  create_superuser      |             Triage Stage:  Accepted
    Has patch:  1                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  1
Easy pickings:  1                     |                    UI/UX:  0
--------------------------------------+------------------------------------
Changes (by xurror):

 * owner:  (none) => xurror
 * status:  new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/30066#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/068.f8e0b0ca50250371deaf2eeb2bdc82bc%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #30066: UserManager.create_superuser doesn't allow for omitting email or password, unlike create_user which does.

Django
In reply to this post by Django
#30066: UserManager.create_superuser doesn't allow for omitting email or password,
unlike create_user which does.
-------------------------------------+-------------------------------------
     Reporter:  Joshua Cannon        |                    Owner:  Daniel
         Type:                       |  Rios
  Cleanup/optimization               |                   Status:  assigned
    Component:  contrib.auth         |                  Version:  2.1
     Severity:  Normal               |               Resolution:
     Keywords:  create_superuser     |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Daniel Rios):

 * owner:  (none) => Daniel Rios
 * status:  new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/30066#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/068.2cbc0182e1bf35805d17a6e8b01631f1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #30066: UserManager.create_superuser doesn't allow for omitting email or password, unlike create_user which does.

Django
In reply to this post by Django
#30066: UserManager.create_superuser doesn't allow for omitting email or password,
unlike create_user which does.
-------------------------------------+-------------------------------------
     Reporter:  Joshua Cannon        |                    Owner:  Daniel
         Type:                       |  Rios
  Cleanup/optimization               |                   Status:  assigned
    Component:  contrib.auth         |                  Version:  2.1
     Severity:  Normal               |               Resolution:
     Keywords:  create_superuser     |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

 * needs_better_patch:  1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/30066#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/068.af6e9a6d5228c862d257db545df4a5c6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #30066: UserManager.create_superuser doesn't allow for omitting email or password, unlike create_user which does.

Django
In reply to this post by Django
#30066: UserManager.create_superuser doesn't allow for omitting email or password,
unlike create_user which does.
-------------------------------------+-------------------------------------
     Reporter:  Joshua Cannon        |                    Owner:  Daniel
         Type:                       |  Rios
  Cleanup/optimization               |                   Status:  assigned
    Component:  contrib.auth         |                  Version:  2.1
     Severity:  Normal               |               Resolution:
     Keywords:  create_superuser     |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

 * needs_better_patch:  0 => 1


Comment:

 Just a couple of minor comments on the PR. Marking "Patch needs
 improvement", please uncheck that when those are addressed.

--
Ticket URL: <https://code.djangoproject.com/ticket/30066#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/068.188ed35bc88d9138c9e07d8b61cadc6a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #30066: UserManager.create_superuser doesn't allow for omitting email or password, unlike create_user which does.

Django
In reply to this post by Django
#30066: UserManager.create_superuser doesn't allow for omitting email or password,
unlike create_user which does.
-------------------------------------+-------------------------------------
     Reporter:  Joshua Cannon        |                    Owner:  Daniel
         Type:                       |  Rios
  Cleanup/optimization               |                   Status:  assigned
    Component:  contrib.auth         |                  Version:  2.1
     Severity:  Normal               |               Resolution:
     Keywords:  create_superuser     |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Daniel Rios):

 * needs_better_patch:  1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/30066#comment:9>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/068.33f7baadf5a130d194d3af23e8521bfe%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #30066: UserManager.create_superuser doesn't allow for omitting email or password, unlike create_user which does.

Django
In reply to this post by Django
#30066: UserManager.create_superuser doesn't allow for omitting email or password,
unlike create_user which does.
-------------------------------------+-------------------------------------
     Reporter:  Joshua Cannon        |                    Owner:  Daniel
         Type:                       |  Rios
  Cleanup/optimization               |                   Status:  assigned
    Component:  contrib.auth         |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:  create_superuser     |             Triage Stage:  Ready for
                                     |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

 * version:  2.1 => master
 * stage:  Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/30066#comment:10>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/068.dab4dad4f5304ed42bb6ccff272cfea2%40djangoproject.com.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #30066: UserManager.create_superuser doesn't allow for omitting email or password, unlike create_user which does.

Django
In reply to this post by Django
#30066: UserManager.create_superuser doesn't allow for omitting email or password,
unlike create_user which does.
-------------------------------------+-------------------------------------
     Reporter:  Joshua Cannon        |                    Owner:  Daniel
         Type:                       |  Rios
  Cleanup/optimization               |                   Status:  closed
    Component:  contrib.auth         |                  Version:  master
     Severity:  Normal               |               Resolution:  fixed
     Keywords:  create_superuser     |             Triage Stage:  Ready for
                                     |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson <carlton.gibson@…>):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"b5a5c92c72cc179b5a9a888039cdd2f0680bff36" b5a5c92c]:
 {{{
 #!CommitTicketReference repository=""
 revision="b5a5c92c72cc179b5a9a888039cdd2f0680bff36"
 Fixed #30066 -- Enabled super user creation without email and password
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/30066#comment:11>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

--
You received this message because you are subscribed to the Google Groups "Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/068.433c0a06f7168cc4371a79c92aa2a6d3%40djangoproject.com.