openwisp-users 1.2.0__tar.gz → 1.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/CHANGES.rst +29 -0
  2. {openwisp_users-1.2.0/openwisp_users.egg-info → openwisp_users-1.2.2}/PKG-INFO +2 -2
  3. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/__init__.py +1 -1
  4. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/accounts/adapter.py +3 -0
  5. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/accounts/urls.py +8 -9
  6. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/admin.py +24 -3
  7. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/backends.py +5 -0
  8. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/settings.py +9 -0
  9. openwisp_users-1.2.2/openwisp_users/static/openwisp-users/css/admin.css +4 -0
  10. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/tests/test_adapter.py +13 -0
  11. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/tests/test_admin.py +16 -1
  12. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/tests/test_backends.py +10 -0
  13. {openwisp_users-1.2.0 → openwisp_users-1.2.2/openwisp_users.egg-info}/PKG-INFO +2 -2
  14. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users.egg-info/requires.txt +1 -1
  15. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/requirements.txt +1 -1
  16. openwisp_users-1.2.0/openwisp_users/static/openwisp-users/css/admin.css +0 -4
  17. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/LICENSE +0 -0
  18. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/MANIFEST.in +0 -0
  19. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/README.rst +0 -0
  20. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/accounts/__init__.py +0 -0
  21. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/accounts/locale/de/LC_MESSAGES/django.po +0 -0
  22. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/accounts/locale/fur/LC_MESSAGES/django.po +0 -0
  23. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/accounts/locale/it/LC_MESSAGES/django.po +0 -0
  24. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/accounts/locale/ru/LC_MESSAGES/django.po +0 -0
  25. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/accounts/locale/sl/LC_MESSAGES/django.po +0 -0
  26. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/accounts/static/openwisp-users/accounts/css/change-password.css +0 -0
  27. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/accounts/static/openwisp-users/accounts/css/non-admin.css +0 -0
  28. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/accounts/templates/account/email/base_message.txt +0 -0
  29. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/accounts/templates/account/email/email_confirmation_message.html +0 -0
  30. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/accounts/templates/account/email/email_confirmation_message.txt +0 -0
  31. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/accounts/templates/account/email/email_confirmation_signup_message.html +0 -0
  32. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/accounts/templates/account/email/password_expiration_message.html +0 -0
  33. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/accounts/templates/account/email/password_expiration_message.txt +0 -0
  34. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/accounts/templates/account/email_confirm.html +0 -0
  35. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/accounts/templates/account/email_verification_success.html +0 -0
  36. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/accounts/templates/account/login.html +0 -0
  37. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/accounts/templates/account/logout_success.html +0 -0
  38. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/accounts/templates/account/password_change.html +0 -0
  39. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/accounts/templates/account/password_change_success.html +0 -0
  40. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/accounts/templates/account/password_not_required.html +0 -0
  41. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/accounts/templates/allauth/layouts/base.html +0 -0
  42. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/accounts/views.py +0 -0
  43. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/api/__init__.py +0 -0
  44. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/api/authentication.py +0 -0
  45. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/api/filters.py +0 -0
  46. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/api/mixins.py +0 -0
  47. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/api/permissions.py +0 -0
  48. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/api/serializers.py +0 -0
  49. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/api/swagger.py +0 -0
  50. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/api/throttling.py +0 -0
  51. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/api/urls.py +0 -0
  52. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/api/views.py +0 -0
  53. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/apps.py +0 -0
  54. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/base/__init__.py +0 -0
  55. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/base/models.py +0 -0
  56. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/locale/de/LC_MESSAGES/django.po +0 -0
  57. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/locale/fur/LC_MESSAGES/django.po +0 -0
  58. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/locale/it/LC_MESSAGES/django.po +0 -0
  59. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/locale/ru/LC_MESSAGES/django.po +0 -0
  60. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/locale/sl/LC_MESSAGES/django.po +0 -0
  61. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/management/__init__.py +0 -0
  62. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/management/commands/__init__.py +0 -0
  63. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/management/commands/export_users.py +0 -0
  64. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/middleware.py +0 -0
  65. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/migrations/0001_initial.py +0 -0
  66. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/migrations/0002_auto_20180508_2017.py +0 -0
  67. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/migrations/0003_default_organization.py +0 -0
  68. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/migrations/0004_default_groups.py +0 -0
  69. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/migrations/0005_user_phone_number.py +0 -0
  70. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/migrations/0006_id_email_index_together.py +0 -0
  71. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/migrations/0007_unique_email.py +0 -0
  72. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/migrations/0008_update_admins_permissions.py +0 -0
  73. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/migrations/0009_create_organization_owners.py +0 -0
  74. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/migrations/0010_allow_admins_change_organization.py +0 -0
  75. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/migrations/0011_user_first_name_150_max_length.py +0 -0
  76. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/migrations/0012_user_location_max_length_256.py +0 -0
  77. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/migrations/0013_user_birth_date.py +0 -0
  78. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/migrations/0014_user_notes.py +0 -0
  79. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/migrations/0015_alter_organization_users_alter_organizationuser_user.py +0 -0
  80. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/migrations/0016_organizationinvitation.py +0 -0
  81. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/migrations/0017_user_language.py +0 -0
  82. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/migrations/0018_allow_operator_view_organisation.py +0 -0
  83. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/migrations/0019_user_password_updated.py +0 -0
  84. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/migrations/0020_populate_password_updated_field.py +0 -0
  85. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/migrations/0021_rename_user_id_email_openwisp_us_id_06c07a_idx.py +0 -0
  86. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/migrations/__init__.py +0 -0
  87. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/mixins.py +0 -0
  88. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/models.py +0 -0
  89. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/multitenancy.py +0 -0
  90. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/password_validation.py +0 -0
  91. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/static/openwisp-users/css/change-password.css +0 -0
  92. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/static/openwisp-users/js/addform.js +0 -0
  93. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/static/openwisp-users/js/org-autocomplete.js +0 -0
  94. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/tasks.py +0 -0
  95. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/templates/admin/action_confirmation.html +0 -0
  96. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/templates/admin/login.html +0 -0
  97. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/templates/admin/openwisp_users/user/change_form.html +0 -0
  98. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/tests/__init__.py +0 -0
  99. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/tests/test_accounts.py +0 -0
  100. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/tests/test_api/__init__.py +0 -0
  101. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/tests/test_api/test_api.py +0 -0
  102. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/tests/test_api/test_authentication.py +0 -0
  103. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/tests/test_api/test_throttling.py +0 -0
  104. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/tests/test_api/test_views.py +0 -0
  105. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/tests/test_commands.py +0 -0
  106. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/tests/test_middlewares.py +0 -0
  107. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/tests/test_models.py +0 -0
  108. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/tests/utils.py +0 -0
  109. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/utils.py +0 -0
  110. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/views.py +0 -0
  111. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users/widgets.py +0 -0
  112. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users.egg-info/SOURCES.txt +0 -0
  113. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users.egg-info/dependency_links.txt +0 -0
  114. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users.egg-info/not-zip-safe +0 -0
  115. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/openwisp_users.egg-info/top_level.txt +0 -0
  116. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/pyproject.toml +0 -0
  117. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/setup.cfg +0 -0
  118. {openwisp_users-1.2.0 → openwisp_users-1.2.2}/setup.py +0 -0
@@ -1,6 +1,35 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ Version 1.2.2 [2026-04-25]
5
+ --------------------------
6
+
7
+ Bugfixes
8
+ ~~~~~~~~
9
+
10
+ - Added SocialAccount inline to UserAdmin when needed `#501
11
+ <https://github.com/openwisp/openwisp-users/issues/501>`_
12
+
13
+ Version 1.2.1 [2026-04-22]
14
+ --------------------------
15
+
16
+ Changes
17
+ ~~~~~~~
18
+
19
+ Dependencies
20
+ ++++++++++++
21
+
22
+ - Allowed upgrade of django-allauth up to 65.13.0.
23
+
24
+ Bugfixes
25
+ ~~~~~~~~
26
+
27
+ - Allowed managing social auth secrets when needed.
28
+ - Ensured ``site_name`` is displayed in password reset email `#482
29
+ <https://github.com/openwisp/openwisp-users/issues/482>`_.
30
+ - Prevented authentication without a username in
31
+ ``UsersAuthenticationBackend``.
32
+
4
33
  Version 1.2.0 [2025-10-23]
5
34
  --------------------------
6
35
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: openwisp-users
3
- Version: 1.2.0
3
+ Version: 1.2.2
4
4
  Summary: Provides basic multi-tenancy features for OpenWISP (using the Django web-framework)
5
5
  Home-page: http://openwisp.org
6
6
  Download-URL: https://github.com/openwisp/openwisp-users/releases
@@ -20,7 +20,7 @@ Classifier: Programming Language :: Python :: 3
20
20
  License-File: LICENSE
21
21
  Requires-Dist: django-organizations<2.6.0,>=2.5.0
22
22
  Requires-Dist: django-extensions<4.2,>=3.2
23
- Requires-Dist: django-allauth[socialaccount]<65.13.0,>=65.12.0
23
+ Requires-Dist: django-allauth[socialaccount]<65.14.0,>=65.12.0
24
24
  Requires-Dist: django-phonenumber-field<8.2.0,>=8.1.0
25
25
  Requires-Dist: phonenumbers<9.1.0,>=9.0.10
26
26
  Requires-Dist: openwisp-utils[celery,rest]~=1.2.0
@@ -1,4 +1,4 @@
1
- VERSION = (1, 2, 0, "final")
1
+ VERSION = (1, 2, 2, "final")
2
2
  __version__ = VERSION # alias
3
3
 
4
4
 
@@ -1,4 +1,5 @@
1
1
  from allauth.account.adapter import DefaultAccountAdapter
2
+ from django.contrib.sites.shortcuts import get_current_site
2
3
  from django.template import TemplateDoesNotExist
3
4
  from django.template.loader import render_to_string
4
5
  from django.utils.translation import gettext as _
@@ -8,6 +9,8 @@ from openwisp_utils.admin_theme.email import send_email
8
9
 
9
10
  class EmailAdapter(DefaultAccountAdapter):
10
11
  def send_mail(self, template_prefix, email, context):
12
+ if "current_site" not in context and hasattr(self, "request"):
13
+ context["current_site"] = get_current_site(self.request)
11
14
  subject = render_to_string("{0}_subject.txt".format(template_prefix), context)
12
15
  subject = " ".join(subject.splitlines()).strip()
13
16
  subject = self.format_email_subject(subject)
@@ -77,12 +77,11 @@ urlpatterns = [
77
77
 
78
78
  if app_settings.SOCIALACCOUNT_ENABLED:
79
79
  urlpatterns += [path("social/", include("allauth.socialaccount.urls"))]
80
-
81
- for provider in providers.registry.get_class_list():
82
- try:
83
- prov_mod = import_module(provider.get_package() + ".urls")
84
- except ImportError:
85
- continue
86
- prov_urlpatterns = getattr(prov_mod, "urlpatterns", None)
87
- if prov_urlpatterns:
88
- urlpatterns += prov_urlpatterns
80
+ for provider in providers.registry.get_class_list():
81
+ try:
82
+ prov_mod = import_module(provider.get_package() + ".urls")
83
+ except ImportError:
84
+ continue
85
+ prov_urlpatterns = getattr(prov_mod, "urlpatterns", None)
86
+ if prov_urlpatterns:
87
+ urlpatterns += prov_urlpatterns
@@ -652,11 +652,32 @@ if admin.site.is_registered(EmailAddress):
652
652
  admin.site.unregister(EmailAddress)
653
653
 
654
654
  if allauth_settings.SOCIALACCOUNT_ENABLED:
655
- for model in [
656
- ("socialaccount", "SocialApp"),
655
+ _unregister_socialaccount_models = [
657
656
  ("socialaccount", "SocialToken"),
658
657
  ("socialaccount", "SocialAccount"),
659
- ]:
658
+ ]
659
+ # allauth OAuth/SAML not enabled
660
+ if not app_settings.SOCIALACCOUNT_ADMIN_NEEDED: # pragma: no cover
661
+ _unregister_socialaccount_models.append(("socialaccount", "SocialApp"))
662
+ # allauth OAuth/SAML enabled
663
+ else:
664
+ from allauth.socialaccount.models import SocialAccount
665
+
666
+ class SocialAccountInline(admin.StackedInline):
667
+ model = SocialAccount
668
+ extra = 0
669
+ readonly_fields = ("provider", "uid", "extra_data")
670
+
671
+ def has_add_permission(self, request, obj=None):
672
+ return False
673
+
674
+ def has_delete_permission(self, request, obj=None):
675
+ return False
676
+
677
+ UserAdmin.inlines.append(SocialAccountInline)
678
+
679
+ # Un-register cluttering socialaccount models
680
+ for model in _unregister_socialaccount_models:
660
681
  model_class = apps.get_model(*model)
661
682
  if admin.site.is_registered(model_class):
662
683
  admin.site.unregister(model_class)
@@ -11,6 +11,11 @@ User = get_user_model()
11
11
 
12
12
  class UsersAuthenticationBackend(ModelBackend):
13
13
  def authenticate(self, request, username=None, password=None, **kwargs):
14
+ # Only proceed if a username is provided. Other auth backends may attempt
15
+ # authentication without a username; returning early here avoids querying
16
+ # the database with a `None` username, which can be inefficient.
17
+ if not username:
18
+ return
14
19
  for user in self.get_users(username):
15
20
  if user.check_password(password) and self.user_can_authenticate(user):
16
21
  return user
@@ -49,3 +49,12 @@ setattr(
49
49
  "openwisp_users.views.AutocompleteJsonView",
50
50
  ),
51
51
  )
52
+
53
+ # if OAuth/SAML is enabled, allow manging keys/secrets
54
+ if any(
55
+ app.startswith("allauth.socialaccount.providers") for app in settings.INSTALLED_APPS
56
+ ): # pragma: no cover
57
+ SOCIALACCOUNT_ADMIN_NEEDED = True
58
+ # otherwise hide the socialaccount admin (not needed)
59
+ else:
60
+ SOCIALACCOUNT_ADMIN_NEEDED = False
@@ -0,0 +1,4 @@
1
+ input.readonly {
2
+ border: 1px solid var(--hairline-color) !important;
3
+ background-color: var(--hairline-color);
4
+ }
@@ -43,3 +43,16 @@ class TestEmailAdapter(TestOrganizationMixin, TestCase):
43
43
  self.assertFalse(email.alternatives)
44
44
  self.assertIn("Password Reset Email", email.subject)
45
45
  self.assertIn("Click the link below to reset your password", email.body)
46
+
47
+ def test_password_reset_includes_site_name(self):
48
+ self._create_user()
49
+ params = {"email": "test@tester.com"}
50
+ self.client.post(reverse("account_reset_password"), params, follow=True)
51
+ self.assertEqual(len(mail.outbox), 1)
52
+ email = mail.outbox[0]
53
+ # plain text body should contain example.com from site name
54
+ self.assertIn("example.com", email.body)
55
+ # if there is an HTML alternative, check it too
56
+ if email.alternatives:
57
+ html = email.alternatives[0][0]
58
+ self.assertIn("example.com", html)
@@ -73,7 +73,7 @@ class TestUsersAdmin(
73
73
 
74
74
  @property
75
75
  def add_user_inline_params(self):
76
- return {
76
+ params = {
77
77
  "emailaddress_set-TOTAL_FORMS": 0,
78
78
  "emailaddress_set-INITIAL_FORMS": 0,
79
79
  "emailaddress_set-MIN_NUM_FORMS": 0,
@@ -83,6 +83,19 @@ class TestUsersAdmin(
83
83
  f"{self.app_label}_organizationuser-MIN_NUM_FORMS": 0,
84
84
  f"{self.app_label}_organizationuser-MAX_NUM_FORMS": 0,
85
85
  }
86
+ self._add_socialaccount_inline_params(params)
87
+ return params
88
+
89
+ def _add_socialaccount_inline_params(self, params):
90
+ if app_settings.SOCIALACCOUNT_ADMIN_NEEDED:
91
+ params.update(
92
+ {
93
+ "socialaccount_set-TOTAL_FORMS": 0,
94
+ "socialaccount_set-INITIAL_FORMS": 0,
95
+ "socialaccount_set-MIN_NUM_FORMS": 0,
96
+ "socialaccount_set-MAX_NUM_FORMS": 0,
97
+ }
98
+ )
86
99
 
87
100
  def test_admin_add_user_auto_email(self):
88
101
  admin = self._create_admin()
@@ -1702,6 +1715,7 @@ class TestBasicUsersIntegration(
1702
1715
 
1703
1716
  app_label = "openwisp_users"
1704
1717
  is_integration_test = True
1718
+ _add_socialaccount_inline_params = TestUsersAdmin._add_socialaccount_inline_params
1705
1719
 
1706
1720
  def _get_user_edit_form_inline_params(self, user, organization):
1707
1721
  params = {
@@ -1740,6 +1754,7 @@ class TestBasicUsersIntegration(
1740
1754
  f"{self.app_label}_organizationuser-0-user": str(user.pk),
1741
1755
  }
1742
1756
  )
1757
+ self._add_socialaccount_inline_params(params)
1743
1758
  return params
1744
1759
 
1745
1760
  def test_change_user(self):
@@ -153,3 +153,13 @@ class TestBackends(TestOrganizationMixin, TestCase):
153
153
  password="tester2",
154
154
  )
155
155
  self.assertEqual(auth_backend.get_users("911524370").count(), 0)
156
+
157
+ @mock.patch("openwisp_users.backends.UsersAuthenticationBackend.get_users")
158
+ def test_user_auth_without_email(self, mocked_get_users):
159
+ self._create_user(
160
+ username="tester",
161
+ password="tester",
162
+ email=None,
163
+ )
164
+ self.client.login(username=None, password=None)
165
+ mocked_get_users.assert_not_called()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: openwisp-users
3
- Version: 1.2.0
3
+ Version: 1.2.2
4
4
  Summary: Provides basic multi-tenancy features for OpenWISP (using the Django web-framework)
5
5
  Home-page: http://openwisp.org
6
6
  Download-URL: https://github.com/openwisp/openwisp-users/releases
@@ -20,7 +20,7 @@ Classifier: Programming Language :: Python :: 3
20
20
  License-File: LICENSE
21
21
  Requires-Dist: django-organizations<2.6.0,>=2.5.0
22
22
  Requires-Dist: django-extensions<4.2,>=3.2
23
- Requires-Dist: django-allauth[socialaccount]<65.13.0,>=65.12.0
23
+ Requires-Dist: django-allauth[socialaccount]<65.14.0,>=65.12.0
24
24
  Requires-Dist: django-phonenumber-field<8.2.0,>=8.1.0
25
25
  Requires-Dist: phonenumbers<9.1.0,>=9.0.10
26
26
  Requires-Dist: openwisp-utils[celery,rest]~=1.2.0
@@ -1,6 +1,6 @@
1
1
  django-organizations<2.6.0,>=2.5.0
2
2
  django-extensions<4.2,>=3.2
3
- django-allauth[socialaccount]<65.13.0,>=65.12.0
3
+ django-allauth[socialaccount]<65.14.0,>=65.12.0
4
4
  django-phonenumber-field<8.2.0,>=8.1.0
5
5
  phonenumbers<9.1.0,>=9.0.10
6
6
  openwisp-utils[celery,rest]~=1.2.0
@@ -1,6 +1,6 @@
1
1
  django-organizations>=2.5.0,<2.6.0
2
2
  django-extensions>=3.2,<4.2
3
- django-allauth[socialaccount]>=65.12.0,<65.13.0
3
+ django-allauth[socialaccount]>=65.12.0,<65.14.0
4
4
  django-phonenumber-field>=8.1.0,<8.2.0
5
5
  phonenumbers>=9.0.10,<9.1.0
6
6
  openwisp-utils[rest,celery]~=1.2.0
@@ -1,4 +0,0 @@
1
- input.readonly {
2
- border: 1px solid rgba(0, 0, 0, 0.05) !important;
3
- background-color: rgba(0, 0, 0, 0.07);
4
- }
File without changes
File without changes
File without changes