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.
- simo/core/__pycache__/signal_receivers.cpython-38.pyc +0 -0
- simo/core/signal_receivers.py +1 -1
- simo/users/__pycache__/api.cpython-38.pyc +0 -0
- simo/users/__pycache__/models.cpython-38.pyc +0 -0
- simo/users/__pycache__/sso_views.cpython-38.pyc +0 -0
- simo/users/api.py +0 -1
- simo/users/auth_backends.py +2 -3
- simo/users/models.py +6 -6
- simo/users/sso_views.py +1 -7
- {simo-2.5.19.dist-info → simo-2.5.20.dist-info}/METADATA +1 -1
- {simo-2.5.19.dist-info → simo-2.5.20.dist-info}/RECORD +15 -15
- {simo-2.5.19.dist-info → simo-2.5.20.dist-info}/LICENSE.md +0 -0
- {simo-2.5.19.dist-info → simo-2.5.20.dist-info}/WHEEL +0 -0
- {simo-2.5.19.dist-info → simo-2.5.20.dist-info}/entry_points.txt +0 -0
- {simo-2.5.19.dist-info → simo-2.5.20.dist-info}/top_level.txt +0 -0
|
Binary file
|
simo/core/signal_receivers.py
CHANGED
|
@@ -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
|
|
Binary file
|
|
Binary file
|
simo/users/api.py
CHANGED
simo/users/auth_backends.py
CHANGED
|
@@ -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(
|
|
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
|
-
|
|
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
|
-
|
|
361
|
-
|
|
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
|
-
|
|
373
|
-
|
|
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
|
-
|
|
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:
|
|
@@ -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=
|
|
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=
|
|
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=
|
|
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=
|
|
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=
|
|
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
|
|
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=
|
|
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=
|
|
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=
|
|
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.
|
|
10565
|
-
simo-2.5.
|
|
10566
|
-
simo-2.5.
|
|
10567
|
-
simo-2.5.
|
|
10568
|
-
simo-2.5.
|
|
10569
|
-
simo-2.5.
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|