drf-iam 0.2.8__py3-none-any.whl → 0.2.9__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.
- drf_iam/utils/load_viewset_permissions.py +3 -3
- {drf_iam-0.2.8.dist-info → drf_iam-0.2.9.dist-info}/METADATA +1 -1
- {drf_iam-0.2.8.dist-info → drf_iam-0.2.9.dist-info}/RECORD +5 -5
- {drf_iam-0.2.8.dist-info → drf_iam-0.2.9.dist-info}/WHEEL +0 -0
- {drf_iam-0.2.8.dist-info → drf_iam-0.2.9.dist-info}/top_level.txt +0 -0
@@ -85,7 +85,7 @@ class PermissionLoader:
|
|
85
85
|
elif isinstance(pattern, URLPattern):
|
86
86
|
callback = pattern.callback
|
87
87
|
viewset_class = getattr(callback, 'cls', None)
|
88
|
-
if is_viewset(viewset_class) or is_api_view(viewset_class):
|
88
|
+
if (is_viewset(viewset_class) or is_api_view(viewset_class)) and getattr(viewset_class,"drf_iam_enabled", True):
|
89
89
|
yield {
|
90
90
|
'prefix': prefix,
|
91
91
|
'pattern': pattern.pattern,
|
@@ -262,10 +262,10 @@ class PermissionLoader:
|
|
262
262
|
to_update: List[PolicyDetail] = []
|
263
263
|
current_map_for_update = {(p.action, p.resource_type): p for p in self.current_db_policies}
|
264
264
|
|
265
|
-
for desired_policy in
|
265
|
+
for desired_policy in current_set & desired_set:
|
266
266
|
current_policy_match = current_map_for_update.get((desired_policy.action, desired_policy.resource_type))
|
267
267
|
if current_policy_match and (
|
268
|
-
current_policy_match.policy_name != desired_policy.policy_name or
|
268
|
+
current_policy_match.policy_name != desired_policy.policy_name or
|
269
269
|
current_policy_match.description != desired_policy.description
|
270
270
|
):
|
271
271
|
to_update.append(PolicyDetail(
|
@@ -9,9 +9,9 @@ drf_iam/migrations/0001_initial.py,sha256=y_4jXnr7gjU4UXxVrgVrStTSFu3h1ZrmjEZDL4
|
|
9
9
|
drf_iam/migrations/0002_add_policy_name.py,sha256=EUZ2OCmobOlmnlpYv0jsMBb3QR0HknW4qAjgn-zOzA0,353
|
10
10
|
drf_iam/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
11
|
drf_iam/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
12
|
-
drf_iam/utils/load_viewset_permissions.py,sha256=
|
12
|
+
drf_iam/utils/load_viewset_permissions.py,sha256=yLLoOhSm-ljD2-YeOV9uS6RuGhgoafP8DZx4hzLIVwY,15150
|
13
13
|
drf_iam/utils/logging_utils.py,sha256=9I9hhSVgOVW5xdKXSKofbjgl6rMYbmAI40euiB5WNlM,2074
|
14
|
-
drf_iam-0.2.
|
15
|
-
drf_iam-0.2.
|
16
|
-
drf_iam-0.2.
|
17
|
-
drf_iam-0.2.
|
14
|
+
drf_iam-0.2.9.dist-info/METADATA,sha256=C4oWKJC502bdMIvZahtxGcF6m8SZ7GIekPLAWrMOjhc,2763
|
15
|
+
drf_iam-0.2.9.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
|
16
|
+
drf_iam-0.2.9.dist-info/top_level.txt,sha256=daz6AaQ9e_cfCjLk2aRoLb_PCOoFofYUX4DU85VwHSM,8
|
17
|
+
drf_iam-0.2.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|