zou 0.20.57__py3-none-any.whl → 0.20.59__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.
- zou/__init__.py +1 -1
- zou/app/blueprints/crud/schedule_item.py +2 -2
- zou/app/blueprints/previews/resources.py +2 -0
- zou/app/blueprints/source/csv/task_type_estimations.py +10 -0
- zou/app/services/user_service.py +25 -34
- {zou-0.20.57.dist-info → zou-0.20.59.dist-info}/METADATA +5 -6
- {zou-0.20.57.dist-info → zou-0.20.59.dist-info}/RECORD +11 -11
- {zou-0.20.57.dist-info → zou-0.20.59.dist-info}/WHEEL +0 -0
- {zou-0.20.57.dist-info → zou-0.20.59.dist-info}/entry_points.txt +0 -0
- {zou-0.20.57.dist-info → zou-0.20.59.dist-info}/licenses/LICENSE +0 -0
- {zou-0.20.57.dist-info → zou-0.20.59.dist-info}/top_level.txt +0 -0
zou/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.20.
|
|
1
|
+
__version__ = "0.20.59"
|
|
@@ -28,8 +28,8 @@ class ScheduleItemResource(BaseModelResource):
|
|
|
28
28
|
BaseModelResource.__init__(self, ScheduleItem)
|
|
29
29
|
|
|
30
30
|
def check_update_permissions(self, instance, data):
|
|
31
|
-
return user_service.
|
|
32
|
-
instance,
|
|
31
|
+
return user_service.check_supervisor_project_task_type_access(
|
|
32
|
+
instance["project_id"], instance["task_type_id"]
|
|
33
33
|
)
|
|
34
34
|
|
|
35
35
|
def update_data(self, data, instance_id):
|
|
@@ -9,12 +9,22 @@ from zou.app.services import (
|
|
|
9
9
|
shots_service,
|
|
10
10
|
tasks_service,
|
|
11
11
|
persons_service,
|
|
12
|
+
user_service,
|
|
12
13
|
)
|
|
13
14
|
|
|
14
15
|
from zou.app.utils import date_helpers
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
class TaskTypeEstimationsCsvImportResource(BaseCsvProjectImportResource):
|
|
19
|
+
"""
|
|
20
|
+
Import the estimations of task-types for given project.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
def check_permissions(self, project_id, task_type, episode_id=None):
|
|
24
|
+
return user_service.check_supervisor_project_task_type_access(
|
|
25
|
+
project_id, task_type["id"]
|
|
26
|
+
)
|
|
27
|
+
|
|
18
28
|
def post(self, project_id, task_type_id, episode_id=None):
|
|
19
29
|
"""
|
|
20
30
|
Import the estimations of task-types for given project.
|
zou/app/services/user_service.py
CHANGED
|
@@ -519,8 +519,31 @@ def check_task_action_access(task_id):
|
|
|
519
519
|
]
|
|
520
520
|
in user["departments"]
|
|
521
521
|
)
|
|
522
|
-
|
|
523
|
-
|
|
522
|
+
|
|
523
|
+
if not is_allowed:
|
|
524
|
+
raise permissions.PermissionDenied
|
|
525
|
+
return is_allowed
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
def check_supervisor_project_task_type_access(project_id, task_type_id):
|
|
529
|
+
"""
|
|
530
|
+
Return true if current user can have access to a task type.
|
|
531
|
+
"""
|
|
532
|
+
is_allowed = False
|
|
533
|
+
if permissions.has_admin_permissions() or (
|
|
534
|
+
permissions.has_manager_permissions()
|
|
535
|
+
and check_belong_to_project(project_id)
|
|
536
|
+
):
|
|
537
|
+
is_allowed = True
|
|
538
|
+
elif permissions.has_supervisor_permissions() and check_belong_to_project(
|
|
539
|
+
project_id
|
|
540
|
+
):
|
|
541
|
+
user = persons_service.get_current_user(relations=True)
|
|
542
|
+
is_allowed = (
|
|
543
|
+
user["departments"] == []
|
|
544
|
+
or tasks_service.get_task_type(task_type_id)["department_id"]
|
|
545
|
+
in user["departments"]
|
|
546
|
+
)
|
|
524
547
|
|
|
525
548
|
if not is_allowed:
|
|
526
549
|
raise permissions.PermissionDenied
|
|
@@ -664,38 +687,6 @@ def check_supervisor_task_access(task, new_data={}):
|
|
|
664
687
|
return is_allowed
|
|
665
688
|
|
|
666
689
|
|
|
667
|
-
def check_supervisor_schedule_item_access(schedule_item, new_data={}):
|
|
668
|
-
"""
|
|
669
|
-
Return true if current user is a manager and has a task assigned related
|
|
670
|
-
to the project of this task or is a supervisor and can modify data accorded
|
|
671
|
-
to his departments
|
|
672
|
-
"""
|
|
673
|
-
is_allowed = False
|
|
674
|
-
if permissions.has_admin_permissions() or (
|
|
675
|
-
permissions.has_manager_permissions()
|
|
676
|
-
and check_belong_to_project(schedule_item["project_id"])
|
|
677
|
-
):
|
|
678
|
-
is_allowed = True
|
|
679
|
-
elif permissions.has_supervisor_permissions() and check_belong_to_project(
|
|
680
|
-
schedule_item["project_id"]
|
|
681
|
-
):
|
|
682
|
-
user_departments = persons_service.get_current_user(relations=True)[
|
|
683
|
-
"departments"
|
|
684
|
-
]
|
|
685
|
-
if (
|
|
686
|
-
user_departments == []
|
|
687
|
-
or tasks_service.get_task_type(schedule_item["task_type_id"])[
|
|
688
|
-
"department_id"
|
|
689
|
-
]
|
|
690
|
-
in user_departments
|
|
691
|
-
):
|
|
692
|
-
is_allowed = True
|
|
693
|
-
|
|
694
|
-
if not is_allowed:
|
|
695
|
-
raise permissions.PermissionDenied
|
|
696
|
-
return is_allowed
|
|
697
|
-
|
|
698
|
-
|
|
699
690
|
def check_metadata_department_access(entity, new_data={}):
|
|
700
691
|
"""
|
|
701
692
|
Return true if current user is a manager and has a task assigned for this
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: zou
|
|
3
|
-
Version: 0.20.
|
|
3
|
+
Version: 0.20.59
|
|
4
4
|
Summary: API to store and manage the data of your animation production
|
|
5
5
|
Home-page: https://zou.cg-wire.com
|
|
6
6
|
Author: CG Wire
|
|
@@ -49,13 +49,12 @@ Requires-Dist: Jinja2==3.1.6
|
|
|
49
49
|
Requires-Dist: ldap3==2.9.1
|
|
50
50
|
Requires-Dist: matterhook==0.2
|
|
51
51
|
Requires-Dist: meilisearch==0.36.0
|
|
52
|
-
Requires-Dist: numpy==2.2.6
|
|
53
|
-
Requires-Dist:
|
|
54
|
-
Requires-Dist: opencv-python==4.11.0.86
|
|
52
|
+
Requires-Dist: numpy==2.2.6
|
|
53
|
+
Requires-Dist: opencv-python==4.12.0.88
|
|
55
54
|
Requires-Dist: OpenTimelineIO==0.17.0
|
|
56
55
|
Requires-Dist: OpenTimelineIO-Plugins==0.17.0
|
|
57
56
|
Requires-Dist: orjson==3.10.18
|
|
58
|
-
Requires-Dist: pillow==11.
|
|
57
|
+
Requires-Dist: pillow==11.3.0
|
|
59
58
|
Requires-Dist: psutil==7.0.0
|
|
60
59
|
Requires-Dist: psycopg[binary]==3.2.9
|
|
61
60
|
Requires-Dist: pyotp==2.9.0
|
|
@@ -69,7 +68,7 @@ Requires-Dist: requests==2.32.4
|
|
|
69
68
|
Requires-Dist: rq==2.4.0
|
|
70
69
|
Requires-Dist: semver==3.0.4
|
|
71
70
|
Requires-Dist: slackclient==2.9.4
|
|
72
|
-
Requires-Dist: spdx-license-list==3.
|
|
71
|
+
Requires-Dist: spdx-license-list==3.27.0
|
|
73
72
|
Requires-Dist: sqlalchemy_utils==0.41.2
|
|
74
73
|
Requires-Dist: sqlalchemy==2.0.41
|
|
75
74
|
Requires-Dist: tabulate==0.9.0
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
zou/__init__.py,sha256=
|
|
1
|
+
zou/__init__.py,sha256=31liBOsQexhNsR3sYFhpdTmwrvjCEHROh_85aI2LtYg,24
|
|
2
2
|
zou/cli.py,sha256=W7nhMII-gyl8AlL6zgDmverSdFphDV_WnuN3BHrHc8w,22448
|
|
3
3
|
zou/debug.py,sha256=1fawPbkD4wn0Y9Gk0BiBFSa-CQe5agFi8R9uJYl2Uyk,520
|
|
4
4
|
zou/event_stream.py,sha256=YOWVGAgseVQKC6usoYDW4T9iRVrG7R8TvP-Nr2AKi6k,8576
|
|
@@ -53,7 +53,7 @@ zou/app/blueprints/crud/preview_file.py,sha256=c-WTDdSbeXmlQalW0s0bTTgixD-tvfV0K
|
|
|
53
53
|
zou/app/blueprints/crud/project.py,sha256=g8kWGzgWyVk7s6Y-41DRAGjIegxS36W4SbP1FMJTQDM,8428
|
|
54
54
|
zou/app/blueprints/crud/project_status.py,sha256=XIiIsAfaD5sLZA6wT3UL4FZQpnoOcqPzYfFIWrp9Svs,540
|
|
55
55
|
zou/app/blueprints/crud/salary_scale.py,sha256=CLvY6DJhSaOZnSqzyLwrEmqRb7Hru2qDC4iB0bKM168,2436
|
|
56
|
-
zou/app/blueprints/crud/schedule_item.py,sha256=
|
|
56
|
+
zou/app/blueprints/crud/schedule_item.py,sha256=O5qPiFw4D1z_E8df7Xtst9k1Hc3RUcOiKbc7YG4PB2E,1438
|
|
57
57
|
zou/app/blueprints/crud/search_filter.py,sha256=qR0crZFfaOd2YxFcPMKhAj1SXCc-YW9Wk4UA07dDgMQ,393
|
|
58
58
|
zou/app/blueprints/crud/search_filter_group.py,sha256=bdCLP1EmSatSNQXW8qYjqXQ1_dqluxUeEe7wEpcP_R0,424
|
|
59
59
|
zou/app/blueprints/crud/software.py,sha256=oKFINQh3DcVTd0Ap_cvgsgvhrIbGPjVBKucwkRpcI3Q,1974
|
|
@@ -95,7 +95,7 @@ zou/app/blueprints/persons/resources.py,sha256=YS5ogqi3xbA0fKZp4c-FH4YWsf3HdBKWy
|
|
|
95
95
|
zou/app/blueprints/playlists/__init__.py,sha256=vuEk1F3hFHsmuKWhdepMoLyOzmNKDn1YrjjfcaIz0lQ,1596
|
|
96
96
|
zou/app/blueprints/playlists/resources.py,sha256=mF3gmlWpe9YKyyKVRUXYtvTCk7OguWIMVaCN_J_JPS4,17636
|
|
97
97
|
zou/app/blueprints/previews/__init__.py,sha256=ihC6OQ9AUjnZ2JeMnjRh_tKGO0UmAjOwhZnOivc3BnQ,4460
|
|
98
|
-
zou/app/blueprints/previews/resources.py,sha256=
|
|
98
|
+
zou/app/blueprints/previews/resources.py,sha256=z6xRlibS2H4SS_Z_7PfgiQ8v23eiZTMigNl6fxeOqj8,53398
|
|
99
99
|
zou/app/blueprints/projects/__init__.py,sha256=KhzIn5HvemfvsP5yJBMImdsEuTA_P806kRpoNbAdfIs,4643
|
|
100
100
|
zou/app/blueprints/projects/resources.py,sha256=Z0UfzCzP9n8YBIH4_2cFaP9tIHCn-jQI7NqtQouCTiY,44938
|
|
101
101
|
zou/app/blueprints/search/__init__.py,sha256=QCjQIY_85l_orhdEiqav_GifjReuwsjZggN3V0GeUVY,356
|
|
@@ -112,7 +112,7 @@ zou/app/blueprints/source/csv/casting.py,sha256=zUlwEnSheoCMTIgvRlKJgNv3hYPDjfSr
|
|
|
112
112
|
zou/app/blueprints/source/csv/edits.py,sha256=yL1RcClBxPNakLt326M2aJk6pVv0H7CrNXALuKHkDZ8,8386
|
|
113
113
|
zou/app/blueprints/source/csv/persons.py,sha256=QciJ47B3rAPyUQTAeToCUAhEai16J4s37oOErjdC_Vw,2582
|
|
114
114
|
zou/app/blueprints/source/csv/shots.py,sha256=5OI0IBY8C72aBbDFrIkvN-ZkWWCHsvOGUQ0Z9rWsnDs,9748
|
|
115
|
-
zou/app/blueprints/source/csv/task_type_estimations.py,sha256=
|
|
115
|
+
zou/app/blueprints/source/csv/task_type_estimations.py,sha256=pFH1kwW5OyElDFc9RtTFLZBgv1bB4oN7dfJJ7DtER9Q,6495
|
|
116
116
|
zou/app/blueprints/source/shotgun/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
117
117
|
zou/app/blueprints/source/shotgun/assets.py,sha256=vuRvy0oUszImYRawrbWC2h7CHYSBvGXDJPoa6ZqpG_U,4980
|
|
118
118
|
zou/app/blueprints/source/shotgun/base.py,sha256=Y0sX8X3oN0AQWiBqjLX-cijnBZH8UzZp4iC8BQpf_tk,6193
|
|
@@ -223,7 +223,7 @@ zou/app/services/sync_service.py,sha256=iWxx1kOGEXympHmSBBQWtDZWNtumdxp8kppee0Oe
|
|
|
223
223
|
zou/app/services/tasks_service.py,sha256=gRD-xODi7tCAyHdi5yJohKavWdODK6TwvDGR9pa82BM,69831
|
|
224
224
|
zou/app/services/telemetry_services.py,sha256=xQm1h1t_JxSFW59zQGf4NuNdUi1UfMa_6pQ-ytRbmGA,1029
|
|
225
225
|
zou/app/services/time_spents_service.py,sha256=8sYnepgeo4yohNFRNiEedqFfL2vuJ78GZSHOpRmp52Q,16502
|
|
226
|
-
zou/app/services/user_service.py,sha256=
|
|
226
|
+
zou/app/services/user_service.py,sha256=VaxYb8tmsNCyIDiKwneSCX-6BnLBElGxQwYPvkcjM2k,51774
|
|
227
227
|
zou/app/stores/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
228
228
|
zou/app/stores/auth_tokens_store.py,sha256=-qOJPybLHvnMOq3PWk073OW9HJwOHGhFLZeOIlX1UVw,1290
|
|
229
229
|
zou/app/stores/file_store.py,sha256=yLQDM6mNbj9oe0vsWdBqun7D8Dw-eSjD1yHCCftX0OI,4045
|
|
@@ -447,9 +447,9 @@ zou/remote/normalize_movie.py,sha256=zNfEY3N1UbAHZfddGONTg2Sff3ieLVWd4dfZa1dpnes
|
|
|
447
447
|
zou/remote/playlist.py,sha256=AsDo0bgYhDcd6DfNRV6r6Jj3URWwavE2ZN3VkKRPbLU,3293
|
|
448
448
|
zou/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
449
449
|
zou/utils/movie.py,sha256=d67fIL9dVBKt-E_qCGXRbNNdbJaJR5sHvZeX3hf8ldE,16559
|
|
450
|
-
zou-0.20.
|
|
451
|
-
zou-0.20.
|
|
452
|
-
zou-0.20.
|
|
453
|
-
zou-0.20.
|
|
454
|
-
zou-0.20.
|
|
455
|
-
zou-0.20.
|
|
450
|
+
zou-0.20.59.dist-info/licenses/LICENSE,sha256=dql8h4yceoMhuzlcK0TT_i-NgTFNIZsgE47Q4t3dUYI,34520
|
|
451
|
+
zou-0.20.59.dist-info/METADATA,sha256=OJ352VnH675IpJvqelgd9HEJYuJ0o_WwFV-UfFrjVy4,6698
|
|
452
|
+
zou-0.20.59.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
453
|
+
zou-0.20.59.dist-info/entry_points.txt,sha256=PelQoIx3qhQ_Tmne7wrLY-1m2izuzgpwokoURwSohy4,130
|
|
454
|
+
zou-0.20.59.dist-info/top_level.txt,sha256=4S7G_jk4MzpToeDItHGjPhHx_fRdX52zJZWTD4SL54g,4
|
|
455
|
+
zou-0.20.59.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|