simo 2.5.19__py3-none-any.whl → 2.5.20__py3-none-any.whl

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.

Potentially problematic release.


This version of simo might be problematic. Click here for more details.

@@ -110,7 +110,7 @@ def create_instance_defaults(sender, instance, created, **kwargs):
110
110
  Component.objects.create(
111
111
  name='Auto state', icon=Icon.objects.get(slug='bolt'),
112
112
  zone=other_zone,
113
- category=other_category,
113
+ category=other_category, show_in_app=False,
114
114
  gateway=generic, base_type='script',
115
115
  controller_uid='simo.generic.controllers.Script',
116
116
  config={
Binary file
simo/users/api.py CHANGED
@@ -65,7 +65,6 @@ class UsersViewSet(mixins.RetrieveModelMixin,
65
65
  if key not in ('role', 'is_active'):
66
66
  request.data.pop(key)
67
67
 
68
-
69
68
  serializer = self.get_serializer(
70
69
  target_user, data=request.data, partial=partial
71
70
  )
@@ -43,7 +43,7 @@ class SIMOUserBackend(ModelBackend):
43
43
 
44
44
  user_q = Exists(Permission.objects.filter(permission_q))
45
45
  if include_superusers:
46
- user_q |= Q(is_superuser=True)
46
+ user_q |= Q(is_master=True)
47
47
  if is_active is not None:
48
48
  user_q &= Q(instance_roles__is_active=is_active).distinct()
49
49
 
@@ -111,5 +111,4 @@ class SSOBackend(ModelBackend):
111
111
  )
112
112
  user.save()
113
113
 
114
- if user.is_active:
115
- return user
114
+ return user
simo/users/models.py CHANGED
@@ -356,9 +356,9 @@ class User(AbstractBaseUser, SimoAdminMixin):
356
356
  def is_superuser(self):
357
357
  if self.is_master:
358
358
  return True
359
- for role in self.roles.all():
360
- if role.is_superuser:
361
- return True
359
+ # for role in self.roles.all():
360
+ # if role.is_superuser:
361
+ # return True
362
362
  return False
363
363
 
364
364
  @property
@@ -368,9 +368,9 @@ class User(AbstractBaseUser, SimoAdminMixin):
368
368
  return False
369
369
  if self.is_master:
370
370
  return True
371
- for role in self.roles.all():
372
- if role.is_superuser:
373
- return True
371
+ # for role in self.roles.all():
372
+ # if role.is_superuser:
373
+ # return True
374
374
  return False
375
375
 
376
376
  @property
simo/users/sso_views.py CHANGED
@@ -72,7 +72,6 @@ class LoginView(View):
72
72
  return self.consumer.consume(url, data)['request_token']
73
73
 
74
74
 
75
-
76
75
  class AuthenticateView(LoginView):
77
76
 
78
77
  def get(self, request):
@@ -82,12 +81,7 @@ class AuthenticateView(LoginView):
82
81
  ).loads(raw_access_token)
83
82
  user_data = self.consumer.consume('/verify/', {'access_token': access_token})
84
83
 
85
- # This is a very fist time when new hub makes a connection to the master cloud
86
- # so we take the chance to pull down all initial configs.
87
- # TURNS OUT IT IS COMMING IN ON EVERY AUTHENTICATION REQUEST
88
- # if user_data.get('extra_data'):
89
- # from simo.core.tasks import save_config
90
- # save_config(user_data['extra_data'])
84
+ print("Authenticate with USER DATA: ", user_data)
91
85
 
92
86
  user = authenticate(request, user_data=user_data)
93
87
  if not user:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: simo
3
- Version: 2.5.19
3
+ Version: 2.5.20
4
4
  Summary: Smart Home on Steroids!
5
5
  Author-email: Simanas Venčkauskas <simanas@simo.io>
6
6
  Project-URL: Homepage, https://simo.io
@@ -56,7 +56,7 @@ simo/core/models.py,sha256=DXJXTtNdpn9yC4VArHp0yrhpRb7vGpwH2c-JvqLE56M,22784
56
56
  simo/core/permissions.py,sha256=v0iJM4LOeYoEfMiw3OLPYio272G1aUEAg_z9Wd1q5m0,2993
57
57
  simo/core/routing.py,sha256=X1_IHxyA-_Q7hw1udDoviVP4_FSBDl8GYETTC2zWTbY,499
58
58
  simo/core/serializers.py,sha256=WgksN1Ombv240nfQR_UtmKslTWM9vz9Y0yTdN5usiHU,21892
59
- simo/core/signal_receivers.py,sha256=YZZVg0MHIqfJ4RxG_KH5G5pkVz97SLXsMkMxpo-ec2I,8842
59
+ simo/core/signal_receivers.py,sha256=WYBRCFJhP83Ukd-Ipc1HlNyTXdTHD1rl0tV3uOKnYWY,8861
60
60
  simo/core/socket_consumers.py,sha256=trRZvBGTJ7xIbfdmVvn7zoiWp_qssSkMZykDrI5YQyE,9783
61
61
  simo/core/storage.py,sha256=_5igjaoWZAiExGWFEJMElxUw55DzJG1jqFty33xe8BE,342
62
62
  simo/core/tasks.py,sha256=M0GHGZvRSik_CDWufcDRwbDQju_88q-yHK_Nnp0N4IA,15923
@@ -89,7 +89,7 @@ simo/core/__pycache__/models.cpython-38.pyc,sha256=HGL3TiaMy-0oobgCGGxH2nvDhh4Rn
89
89
  simo/core/__pycache__/permissions.cpython-38.pyc,sha256=fH4iyqd9DdzRLEu2b621-FeM-napR0M7hzBUTHo9Q3g,2972
90
90
  simo/core/__pycache__/routing.cpython-38.pyc,sha256=3T3FPJ8Cn99xZCGvMyg2xjl7al-Shm9CelbSpkJtNP8,599
91
91
  simo/core/__pycache__/serializers.cpython-38.pyc,sha256=d4wpUjFuo8GxaNWbin9GdHKik06IZN32uZL1SnXiL_s,19616
92
- simo/core/__pycache__/signal_receivers.cpython-38.pyc,sha256=bBnV6L69VVH46nrWDHi4VGBEMcxusfEsXN7aZoQRzDI,6729
92
+ simo/core/__pycache__/signal_receivers.cpython-38.pyc,sha256=ZxsQUC_bijcKs2A9BifeqdI5JVS0RCsZpdcBTRoT8o8,6733
93
93
  simo/core/__pycache__/socket_consumers.cpython-38.pyc,sha256=KqbO1cOewodVPcy0-htVefyUjCuELKV0o7fOfYqfgPc,8490
94
94
  simo/core/__pycache__/storage.cpython-38.pyc,sha256=9R1Xu0FJDflfRXUPsqEgt0SpwiP7FGk7HaR8s8XRyI8,721
95
95
  simo/core/__pycache__/tasks.cpython-38.pyc,sha256=mLvFf_G9SCINI2aQYV7rIuGkMj5qe6orc2L359Mz6CY,10766
@@ -10443,35 +10443,35 @@ simo/notifications/migrations/__pycache__/0003_alter_notification_instance.cpyth
10443
10443
  simo/notifications/migrations/__pycache__/__init__.cpython-38.pyc,sha256=YMBRHVon2nWDtIUbghckjnC12sIg_ykPWhV5aM0tto4,178
10444
10444
  simo/users/__init__.py,sha256=6a7uBpCWB_DR7p54rbHusc0xvi1qfT1ZCCQGb6TiBh8,52
10445
10445
  simo/users/admin.py,sha256=WDRJJtEkbYBQFtLg_5VOIlBV0eeJhgmrsFL51ttme0w,6760
10446
- simo/users/api.py,sha256=WSFUqBf6PMZNjZeqyppXfALs-la0rV-TVZUjuqDbeHA,12154
10446
+ simo/users/api.py,sha256=wMX7zknPSgEe4Rd-N6313SVFrx7QMwZXKZ1lX3qtMjI,12153
10447
10447
  simo/users/apps.py,sha256=cq0A8-U1HALEwev0TicgFhr4CAu7Icz8rwq0HfOaL4E,207
10448
- simo/users/auth_backends.py,sha256=bBSNXQJ88TRXaQxyh1aETfmOIfiDr08Jnj8rSY9sHDk,4074
10448
+ simo/users/auth_backends.py,sha256=1gy1-R1U8AOixJ3Ou2LTILjKOHTUxavm_zDiQtCAA9Q,4040
10449
10449
  simo/users/auto_urls.py,sha256=lcJvteBsbHQMJieZpDz-63tDYejLApqsW3CUnDakd7k,272
10450
10450
  simo/users/dynamic_settings.py,sha256=sEIsi4yJw3kH46Jq_aOkSuK7QTfQACGUE-lkyBogCaM,570
10451
10451
  simo/users/managers.py,sha256=Dm21Avmu38-h8MsZ5ljtpgKihMGUBU4hHGpiPvp4NtM,323
10452
10452
  simo/users/middleware.py,sha256=GMCrnWSc_2qCleyQIkfQGdL-pU-UTEcSg1wPvIKZ9uk,1210
10453
- simo/users/models.py,sha256=8P-nldx9cm17GxRM9p0Vkfc-MSzOK0jXpkuOD3Y46yI,19281
10453
+ simo/users/models.py,sha256=u0coEe4ZoXcePyI0qZpeIW-rDVEvxXVfUkfGlZfSPKE,19293
10454
10454
  simo/users/permissions.py,sha256=IwtYS8yQdupWbYKR9VimSRDV3qCJ2jXP57Lyjpb2EQM,242
10455
10455
  simo/users/serializers.py,sha256=zzw1KONTnaTNBaU0r4rNVxJ827KzD6Z5LuQt27ZsQ98,2516
10456
10456
  simo/users/sso_urls.py,sha256=gQOaPvGMYFD0NCVSwyoWO-mTEHe5j9sbzV_RK7kdvp0,251
10457
- simo/users/sso_views.py,sha256=-XI67TvQ7SN3goU4OuAHyn84u_1vtusvpn7Pu0K97zo,4648
10457
+ simo/users/sso_views.py,sha256=5J0D4qUFQDvd-Fcqx_xLJWLJgPdqtVD5DDiPJyPsT2Q,4336
10458
10458
  simo/users/tasks.py,sha256=HJAqiyWGsaN3wSfquU0UyQ20jL-njXeaaTOdDT3TQ3s,979
10459
10459
  simo/users/utils.py,sha256=1HGSZyHRqQvdJ4RtAiZDg1juvgG8aOlrGXR7CcvsyQc,1886
10460
10460
  simo/users/views.py,sha256=dOQVvmlHG7ihWKJLFUBcqKOA0UDctlMKR0pTc36JZqg,3487
10461
10461
  simo/users/__pycache__/__init__.cpython-38.pyc,sha256=VFoDJE_SKKaPqqYaaBYd1Ndb1hjakkTo_u0EG_XJ1GM,211
10462
10462
  simo/users/__pycache__/admin.cpython-38.pyc,sha256=5LEDivt0AydPmqk9PCKvlKRRtc3QBxA6hZgcy_8bEQU,7680
10463
- simo/users/__pycache__/api.cpython-38.pyc,sha256=BCee2Qk_VJLtXGb13VyHasDo2HmGW1ZVE6WiuTi2ijA,10223
10463
+ simo/users/__pycache__/api.cpython-38.pyc,sha256=2BBBoY8SwvTTL6-bCGjY-Dm8ao5NHRGyJ8WB7EPR9cw,10223
10464
10464
  simo/users/__pycache__/apps.cpython-38.pyc,sha256=dgbWL8CxzzISJQTmq_4IztPJ2UzykNVdqA2Ae1PmeGk,605
10465
10465
  simo/users/__pycache__/auth_backends.cpython-38.pyc,sha256=n5nx2QSXNj2idzRcGE6bAagMN-8qxoCs580H1EFZXls,3105
10466
10466
  simo/users/__pycache__/auto_urls.cpython-38.pyc,sha256=K-3sz2h-cEitoflSmZk1t0eUg5mQMMGLNZFREVwG7_o,430
10467
10467
  simo/users/__pycache__/dynamic_settings.cpython-38.pyc,sha256=6F8JBjZkHykySnmZjNEzjS0ijbmPdcp9yUAZ5kqq_Fo,864
10468
10468
  simo/users/__pycache__/managers.cpython-38.pyc,sha256=oAy5mRBI-FQWgx9xgQsHmCiknKqojuVY363mfEVK0i8,697
10469
10469
  simo/users/__pycache__/middleware.cpython-38.pyc,sha256=Tj4nVEAvxEW3xA63fBRiJWRJpz_M848ZOqbHioc_IPE,1149
10470
- simo/users/__pycache__/models.cpython-38.pyc,sha256=gETn4dAfZAkIpclgbmegAxWzFeq6KjZ0GPeEIP0Un54,17879
10470
+ simo/users/__pycache__/models.cpython-38.pyc,sha256=2FpY14z17h6x7lJI08uiu4dONVadYf7j5ZZtqKQkWdc,17767
10471
10471
  simo/users/__pycache__/permissions.cpython-38.pyc,sha256=ez5NxoL_JUeeH6GsKhvFreuA3FCBgGf9floSypdXUtM,633
10472
10472
  simo/users/__pycache__/serializers.cpython-38.pyc,sha256=Dy8RAcwNkNSXoJHvLp8fozURyHCtucqpSPyqZtbnMZc,3732
10473
10473
  simo/users/__pycache__/sso_urls.cpython-38.pyc,sha256=uAwDozpOmrhUald-8tOHANILXkH7-TI8fNYXOtPkSY8,402
10474
- simo/users/__pycache__/sso_views.cpython-38.pyc,sha256=sHEoxLOac3U3Epmhm197huFnW_J3gGCDZSji57itijU,3969
10474
+ simo/users/__pycache__/sso_views.cpython-38.pyc,sha256=PLRF6FYCxRhnmgnN_gUS-pdQlH7lofLU1Xhgw3vDO_Y,4019
10475
10475
  simo/users/__pycache__/tasks.cpython-38.pyc,sha256=XLMKt3suT7BlcXrJZoH9ZIhhtBuqyiW4lsOB9IbBkko,1225
10476
10476
  simo/users/__pycache__/utils.cpython-38.pyc,sha256=S-2i_Y11eTcUpmn-RkX1B4_tDvZJdqkZqqoewpkcsUM,1739
10477
10477
  simo/users/__pycache__/views.cpython-38.pyc,sha256=AXuUnVYRD0ai4FSFDp4qJwryukujAoN6LD3oIj-Cv3o,2426
@@ -10561,9 +10561,9 @@ simo/users/templates/invitations/expired_msg.html,sha256=47DEQpj8HBSa-_TImW-5JCe
10561
10561
  simo/users/templates/invitations/expired_suggestion.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10562
10562
  simo/users/templates/invitations/taken_msg.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10563
10563
  simo/users/templates/invitations/taken_suggestion.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10564
- simo-2.5.19.dist-info/LICENSE.md,sha256=M7wm1EmMGDtwPRdg7kW4d00h1uAXjKOT3HFScYQMeiE,34916
10565
- simo-2.5.19.dist-info/METADATA,sha256=NsP9qv6SZr9uYMDMweh18wvAxLc5WRGqCiu0-apto0U,1924
10566
- simo-2.5.19.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
10567
- simo-2.5.19.dist-info/entry_points.txt,sha256=S9PwnUYmTSW7681GKDCxUbL0leRJIaRk6fDQIKgbZBA,135
10568
- simo-2.5.19.dist-info/top_level.txt,sha256=GmS1hrAbpVqn9OWZh6UX82eIOdRLgYA82RG9fe8v4Rs,5
10569
- simo-2.5.19.dist-info/RECORD,,
10564
+ simo-2.5.20.dist-info/LICENSE.md,sha256=M7wm1EmMGDtwPRdg7kW4d00h1uAXjKOT3HFScYQMeiE,34916
10565
+ simo-2.5.20.dist-info/METADATA,sha256=3zff-kYLC7lJl0QQHx0CxBTHJuxFpkh4AnxXAWb0XSw,1924
10566
+ simo-2.5.20.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
10567
+ simo-2.5.20.dist-info/entry_points.txt,sha256=S9PwnUYmTSW7681GKDCxUbL0leRJIaRk6fDQIKgbZBA,135
10568
+ simo-2.5.20.dist-info/top_level.txt,sha256=GmS1hrAbpVqn9OWZh6UX82eIOdRLgYA82RG9fe8v4Rs,5
10569
+ simo-2.5.20.dist-info/RECORD,,
File without changes