educommon 3.21.0__py3-none-any.whl → 3.22.0__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.
- educommon/auth/rbac/manager.py +5 -5
- educommon/auth/simple_auth/actions.py +9 -10
- educommon/m3/extensions/listeners/delete_check/signals.py +2 -2
- educommon/report/constructor/migrations/0011_alter_reportfilter_case_sensitive_and_more.py +33 -0
- educommon/report/constructor/models.py +4 -7
- {educommon-3.21.0.dist-info → educommon-3.22.0.dist-info}/METADATA +3 -2
- {educommon-3.21.0.dist-info → educommon-3.22.0.dist-info}/RECORD +9 -8
- {educommon-3.21.0.dist-info → educommon-3.22.0.dist-info}/WHEEL +0 -0
- {educommon-3.21.0.dist-info → educommon-3.22.0.dist-info}/top_level.txt +0 -0
educommon/auth/rbac/manager.py
CHANGED
@@ -24,10 +24,6 @@ from django.utils.functional import (
|
|
24
24
|
from m3.actions import (
|
25
25
|
ControllerCache,
|
26
26
|
)
|
27
|
-
from m3_django_compat import (
|
28
|
-
atomic,
|
29
|
-
get_installed_apps,
|
30
|
-
)
|
31
27
|
|
32
28
|
from educommon.auth.rbac.models import (
|
33
29
|
Permission,
|
@@ -35,6 +31,10 @@ from educommon.auth.rbac.models import (
|
|
35
31
|
from educommon.utils.db.postgresql import (
|
36
32
|
Lock,
|
37
33
|
)
|
34
|
+
from m3_django_compat import (
|
35
|
+
atomic,
|
36
|
+
get_installed_apps,
|
37
|
+
)
|
38
38
|
|
39
39
|
|
40
40
|
def _get_handler(handler):
|
@@ -104,7 +104,7 @@ def _set_permission(permission, name, title, description, hidden):
|
|
104
104
|
class RBACManager:
|
105
105
|
"""Менеджер системы авторизации RBAC."""
|
106
106
|
|
107
|
-
post_init = Signal(
|
107
|
+
post_init = Signal()
|
108
108
|
"""Сигнал, отправляемый после обновления разрешений в БД.
|
109
109
|
|
110
110
|
:param bool changed: Указывает, были ли в процессе инициализации подсистемы
|
@@ -37,18 +37,10 @@ from m3.actions.results import (
|
|
37
37
|
OperationResult,
|
38
38
|
PreJsonResult,
|
39
39
|
)
|
40
|
-
from m3_django_compat import (
|
41
|
-
get_user_model,
|
42
|
-
)
|
43
40
|
from m3_ext.ui.shortcuts import (
|
44
41
|
MessageBox,
|
45
42
|
)
|
46
43
|
|
47
|
-
from objectpack.actions import (
|
48
|
-
BaseAction,
|
49
|
-
BasePack,
|
50
|
-
)
|
51
|
-
|
52
44
|
from educommon import (
|
53
45
|
ioc,
|
54
46
|
)
|
@@ -63,6 +55,13 @@ from educommon.auth.simple_auth.models import (
|
|
63
55
|
from educommon.m3 import (
|
64
56
|
convert_validation_error_to,
|
65
57
|
)
|
58
|
+
from m3_django_compat import (
|
59
|
+
get_user_model,
|
60
|
+
)
|
61
|
+
from objectpack.actions import (
|
62
|
+
BaseAction,
|
63
|
+
BasePack,
|
64
|
+
)
|
66
65
|
|
67
66
|
|
68
67
|
class AuthPack(BasePack):
|
@@ -174,7 +173,7 @@ class LoginAction(BaseAction):
|
|
174
173
|
|
175
174
|
err_msg = self.parent.login_checker.check(request, username, password)
|
176
175
|
|
177
|
-
if not request.
|
176
|
+
if not request.headers.get('x-requested-with') == 'XMLHttpRequest':
|
178
177
|
result = HttpResponseRedirect('/')
|
179
178
|
elif err_msg:
|
180
179
|
result = PreJsonResult(
|
@@ -378,7 +377,7 @@ class LogoutAction(BaseAction):
|
|
378
377
|
def run(self, request, context):
|
379
378
|
auth.logout(request)
|
380
379
|
|
381
|
-
if request.
|
380
|
+
if request.headers.get('x-requested-with') == 'XMLHttpRequest':
|
382
381
|
return PreJsonResult({})
|
383
382
|
else:
|
384
383
|
return http.HttpResponseRedirect('/')
|
@@ -6,5 +6,5 @@ from django.db.models.signals import (
|
|
6
6
|
# Сигналы перед и после каскадного удаления объекта (CascadeDeleteMixin)
|
7
7
|
# - instance - удаляемый объект
|
8
8
|
# - initiator - объект, который стал инициатором удаления instance
|
9
|
-
pre_cascade = ModelSignal(
|
10
|
-
post_cascade = ModelSignal(
|
9
|
+
pre_cascade = ModelSignal()
|
10
|
+
post_cascade = ModelSignal()
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# Generated by Django 4.0.10 on 2025-07-08 14:52
|
2
|
+
|
3
|
+
from django.db import migrations, models
|
4
|
+
|
5
|
+
|
6
|
+
class Migration(migrations.Migration):
|
7
|
+
|
8
|
+
dependencies = [
|
9
|
+
('report_constructor', '0010_add_aggregate_fields'),
|
10
|
+
]
|
11
|
+
|
12
|
+
operations = [
|
13
|
+
migrations.AlterField(
|
14
|
+
model_name='reportfilter',
|
15
|
+
name='case_sensitive',
|
16
|
+
field=models.BooleanField(null=True, verbose_name='Учет регистра'),
|
17
|
+
),
|
18
|
+
migrations.AlterField(
|
19
|
+
model_name='reportfiltergroup',
|
20
|
+
name='level',
|
21
|
+
field=models.PositiveIntegerField(editable=False),
|
22
|
+
),
|
23
|
+
migrations.AlterField(
|
24
|
+
model_name='reportfiltergroup',
|
25
|
+
name='lft',
|
26
|
+
field=models.PositiveIntegerField(editable=False),
|
27
|
+
),
|
28
|
+
migrations.AlterField(
|
29
|
+
model_name='reportfiltergroup',
|
30
|
+
name='rght',
|
31
|
+
field=models.PositiveIntegerField(editable=False),
|
32
|
+
),
|
33
|
+
]
|
@@ -9,10 +9,6 @@ from mptt.models import (
|
|
9
9
|
TreeForeignKey,
|
10
10
|
)
|
11
11
|
|
12
|
-
from objectpack.exceptions import (
|
13
|
-
ValidationError,
|
14
|
-
)
|
15
|
-
|
16
12
|
from educommon.django.db.mixins.validation import (
|
17
13
|
post_clean,
|
18
14
|
)
|
@@ -34,6 +30,9 @@ from educommon.report.constructor.validators import (
|
|
34
30
|
from educommon.utils.misc import (
|
35
31
|
cached_property,
|
36
32
|
)
|
33
|
+
from objectpack.exceptions import (
|
34
|
+
ValidationError,
|
35
|
+
)
|
37
36
|
|
38
37
|
|
39
38
|
class ReportTemplate(CascadeDeleteMixin, BaseModel):
|
@@ -331,9 +330,7 @@ class ReportFilter(BaseModel):
|
|
331
330
|
'Исключать записи, удовлетворяющие условию',
|
332
331
|
default=False,
|
333
332
|
)
|
334
|
-
case_sensitive = models.
|
335
|
-
'Учет регистра',
|
336
|
-
)
|
333
|
+
case_sensitive = models.BooleanField('Учет регистра', null=True)
|
337
334
|
values = ArrayField(
|
338
335
|
models.TextField(
|
339
336
|
'Значение',
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: educommon
|
3
|
-
Version: 3.
|
3
|
+
Version: 3.22.0
|
4
4
|
Summary: Общая кодовая база для проектов БЦ Образование
|
5
5
|
Author-email: BARS Group <education_dev@bars-open.ru>
|
6
6
|
Project-URL: Homepage, https://stash.bars-open.ru/projects/EDUBASE/repos/educommon/browse
|
@@ -17,10 +17,11 @@ Classifier: Framework :: Django :: 2.2
|
|
17
17
|
Classifier: Framework :: Django :: 3.0
|
18
18
|
Classifier: Framework :: Django :: 3.1
|
19
19
|
Classifier: Framework :: Django :: 3.2
|
20
|
+
Classifier: Framework :: Django :: 4.0
|
20
21
|
Requires-Python: >=3.9
|
21
22
|
Description-Content-Type: text/markdown
|
22
23
|
Requires-Dist: packaging<25,>=21
|
23
|
-
Requires-Dist: Django<
|
24
|
+
Requires-Dist: Django<5.0,>=3.1
|
24
25
|
Requires-Dist: django-mptt
|
25
26
|
Requires-Dist: python-dateutil
|
26
27
|
Requires-Dist: termcolor
|
@@ -84,7 +84,7 @@ educommon/auth/rbac/app_meta.py,sha256=IprrnLlW5tYVew3h0RhIqByQmvsd6huZAdEcrvYbB
|
|
84
84
|
educommon/auth/rbac/checker.py,sha256=1Iu3RNzf2VGWV-7DSPXQnECQxJjNOu-vq79eQ52uHwo,2927
|
85
85
|
educommon/auth/rbac/config.py,sha256=mRpOzD29ZHc0zX-CxhUyyICj3h0xj9gUM6N1OoLEWm0,1074
|
86
86
|
educommon/auth/rbac/constants.py,sha256=Hm4kuG7HZ9krTwF6HIj3eMe8v98ui3EMueToBTeOh4A,502
|
87
|
-
educommon/auth/rbac/manager.py,sha256=
|
87
|
+
educommon/auth/rbac/manager.py,sha256=PntYREOVL17IfB38VwRCt1ufiXtiLNxLA_RL5A4oA0g,15700
|
88
88
|
educommon/auth/rbac/models.py,sha256=Gg4o0gyuUuPsaQMvgnvgmxx1-iccye0d5Hk1CbQfYQA,16198
|
89
89
|
educommon/auth/rbac/permissions.py,sha256=S3P-q6wFI_ZDawYgfgFg3gcMk68Pvm-X3wnzERgmc_M,868
|
90
90
|
educommon/auth/rbac/ui.py,sha256=RuPPJAhOird0idLEtd4ybSJxEIGMXuqcPpBOzh9NMTI,16298
|
@@ -107,7 +107,7 @@ educommon/auth/rbac/templates/rbac/role-edit-window.js,sha256=5MueeeqykEdsW6BceI
|
|
107
107
|
educommon/auth/rbac/templates/rbac/roles-list-window.js,sha256=q7QqjsRyFtr1qk0dOJ9zn708SzCR9t_uN03ureIcqNQ,3768
|
108
108
|
educommon/auth/rbac/templates/rbac/roles-view-list-window.js,sha256=gRkVvd-Wak57q9mNgDSXzzy-Pv-ZQokwQIlmhlFLys0,536
|
109
109
|
educommon/auth/simple_auth/__init__.py,sha256=GvXC6lP94ADiTg5k9JmDI1FkG8tlJxBum5e4_6zbJHI,237
|
110
|
-
educommon/auth/simple_auth/actions.py,sha256=
|
110
|
+
educommon/auth/simple_auth/actions.py,sha256=Hl_tYZ55Z3GRx8lp9fvjS53OycmPK0pgm1W183kOCsY,13193
|
111
111
|
educommon/auth/simple_auth/app_meta.py,sha256=RAj9kQt30gje_qqF0ZwoOcqqGjXjYInJiw50xwfekT8,1017
|
112
112
|
educommon/auth/simple_auth/checkers.py,sha256=cFGjmCc_YkXaK0m7rMjlnUid8VnyGKRtM7vELc3eFvA,2496
|
113
113
|
educommon/auth/simple_auth/const.py,sha256=vizOnXnOVzY5CkgilnwBmhc3vO4biYKUu4VnzM7XsL4,396
|
@@ -224,7 +224,7 @@ educommon/m3/extensions/listeners/delete_check/cancel-confirm-window.js,sha256=X
|
|
224
224
|
educommon/m3/extensions/listeners/delete_check/listeners.py,sha256=Vc-y0E3OaNI4MYhPY65hUo2p5m2qpp63F2H7mQABLeE,6340
|
225
225
|
educommon/m3/extensions/listeners/delete_check/mixins.py,sha256=OZCHFUqq6YI7V7-9NNp72kA40jxq3X9sp-89UN0gnSU,7938
|
226
226
|
educommon/m3/extensions/listeners/delete_check/related-objects-window.html,sha256=Do_SnmWfexnhDzgvr7o7JJubH4N8pvPNa268cd-JIcA,94
|
227
|
-
educommon/m3/extensions/listeners/delete_check/signals.py,sha256=
|
227
|
+
educommon/m3/extensions/listeners/delete_check/signals.py,sha256=JEPj9sbuCqIxLeRmc6kB81omyhvOCmFKAHUimNMU__Q,387
|
228
228
|
educommon/m3/extensions/listeners/delete_check/ui.py,sha256=3omrRxPt2PRL4rjzjXQQITwZYoR9xnmnvcyJYJn54Pk,3376
|
229
229
|
educommon/m3/extensions/listeners/delete_check/utils.py,sha256=RD7agHge_O-bxgpi1D7rke7PY6PAYodDTY19OIT6Zzc,3028
|
230
230
|
educommon/objectpack/__init__.py,sha256=TwmrbrumJoH9KjYhbLnKExWmo4A0UQeyNYTK__93Vr8,69
|
@@ -251,7 +251,7 @@ educommon/report/constructor/config.py,sha256=2kWlilm6LGXAbrVHnLbzhwp1pTBAz_eOf_
|
|
251
251
|
educommon/report/constructor/constants.py,sha256=VF3tu6vEWrN37oPyipD3LGCElbaY2JHGaKy7AxUbQIU,3381
|
252
252
|
educommon/report/constructor/exceptions.py,sha256=4k2fHrMr-U74kjjE8hXDtG-MRaZBGqNir7-KPf4h_AY,1153
|
253
253
|
educommon/report/constructor/mixins.py,sha256=dMwBJJbkE4YeBSi49EMrNlDan4Mkqatbif8n11XcpqU,2788
|
254
|
-
educommon/report/constructor/models.py,sha256=
|
254
|
+
educommon/report/constructor/models.py,sha256=iE_Dqeu4blLwzyZje-oJPUEC2ikyfCPrtNcgkCkk5-s,17904
|
255
255
|
educommon/report/constructor/plugin_meta.py,sha256=52IdIKr7ArMiHOnyZlKV5Fn6PxMhSbttipXz_Vbfkmg,114
|
256
256
|
educommon/report/constructor/registries.py,sha256=aTFeW0htAeDYWd9HlLqn3GTK3mttjS8I8LddPc6Ea7M,1883
|
257
257
|
educommon/report/constructor/utils.py,sha256=kjiYBfC0-DmDk5kYOOevmc7SUcytljyemb1uy4qa4hA,6494
|
@@ -278,6 +278,7 @@ educommon/report/constructor/migrations/0007_include_available_units.py,sha256=e
|
|
278
278
|
educommon/report/constructor/migrations/0008_auto_20170407_1318.py,sha256=jXGQZHKlJgc7LMTIPo7EV5Keh86_rm-52sSqwN8pYyU,555
|
279
279
|
educommon/report/constructor/migrations/0009_auto_20180405_0642.py,sha256=Skf1q8ONvLR_keNh4qZ5RRsORjFdyCDZJO4NbaGWl8U,485
|
280
280
|
educommon/report/constructor/migrations/0010_add_aggregate_fields.py,sha256=DyY52puOKq9rDABEHLwgylTxWSS1hE6zgaTp5GiMqaY,922
|
281
|
+
educommon/report/constructor/migrations/0011_alter_reportfilter_case_sensitive_and_more.py,sha256=kCwjtYLwZD-rktHY2oYBZZHyv--Ng4rBgdOSQuuJOMw,977
|
281
282
|
educommon/report/constructor/migrations/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
282
283
|
educommon/rest/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
283
284
|
educommon/rest/actions.py,sha256=LpFtNDuxIDQ2GG6hBqkLrINrW087tLjlfyUHv85AUGA,1255
|
@@ -355,7 +356,7 @@ educommon/ws_log/smev/exceptions.py,sha256=VNfzNHlj5Pz8D4979d_msTkxC-RQVoMctsgoJ
|
|
355
356
|
educommon/ws_log/templates/report/smev_logs.xlsx,sha256=nnYgB0Z_ix8HoxsRICjsZfFRQBdra-5Gd8nWhCxTjYg,10439
|
356
357
|
educommon/ws_log/templates/ui-js/smev-logs-list-window.js,sha256=AGup3D8GTJSY9WdDPj0zBJeYQBFOmGgcbxPOJbKK-nY,513
|
357
358
|
educommon/ws_log/templates/ui-js/smev-logs-report-setting-window.js,sha256=nQ7QYK9frJcE7g7kIt6INg9TlEEJAPPayBJgRaoTePA,1103
|
358
|
-
educommon-3.
|
359
|
-
educommon-3.
|
360
|
-
educommon-3.
|
361
|
-
educommon-3.
|
359
|
+
educommon-3.22.0.dist-info/METADATA,sha256=4Co0JRdXDtmZBQfRxNAyZahv8I7osHs-PJHfs12hemA,2421
|
360
|
+
educommon-3.22.0.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
361
|
+
educommon-3.22.0.dist-info/top_level.txt,sha256=z5fbW7bz_0V1foUm_FGcZ9_MTpW3N1dBN7-kEmMowl4,10
|
362
|
+
educommon-3.22.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|