drf-iam 0.2.8__py3-none-any.whl → 0.2.10__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 +5 -3
- {drf_iam-0.2.8.dist-info → drf_iam-0.2.10.dist-info}/METADATA +1 -1
- {drf_iam-0.2.8.dist-info → drf_iam-0.2.10.dist-info}/RECORD +5 -5
- {drf_iam-0.2.8.dist-info → drf_iam-0.2.10.dist-info}/WHEEL +0 -0
- {drf_iam-0.2.8.dist-info → drf_iam-0.2.10.dist-info}/top_level.txt +0 -0
@@ -85,7 +85,9 @@ 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,
|
89
|
+
"drf_iam_exclude_from_permissions",
|
90
|
+
True):
|
89
91
|
yield {
|
90
92
|
'prefix': prefix,
|
91
93
|
'pattern': pattern.pattern,
|
@@ -262,10 +264,10 @@ class PermissionLoader:
|
|
262
264
|
to_update: List[PolicyDetail] = []
|
263
265
|
current_map_for_update = {(p.action, p.resource_type): p for p in self.current_db_policies}
|
264
266
|
|
265
|
-
for desired_policy in
|
267
|
+
for desired_policy in current_set & desired_set:
|
266
268
|
current_policy_match = current_map_for_update.get((desired_policy.action, desired_policy.resource_type))
|
267
269
|
if current_policy_match and (
|
268
|
-
current_policy_match.policy_name != desired_policy.policy_name or
|
270
|
+
current_policy_match.policy_name != desired_policy.policy_name or
|
269
271
|
current_policy_match.description != desired_policy.description
|
270
272
|
):
|
271
273
|
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=IN4V7hJxzFZWQTugS9ZgOS9vRJl3qvQnpJ-Hyf92Gbw,15346
|
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.10.dist-info/METADATA,sha256=e1628A74BsFYv_Fd62RySOwbpeKSJv2dHbZO5kBfMsI,2764
|
15
|
+
drf_iam-0.2.10.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
|
16
|
+
drf_iam-0.2.10.dist-info/top_level.txt,sha256=daz6AaQ9e_cfCjLk2aRoLb_PCOoFofYUX4DU85VwHSM,8
|
17
|
+
drf_iam-0.2.10.dist-info/RECORD,,
|
File without changes
|
File without changes
|