drf-iam 0.2.0__tar.gz → 0.2.3__tar.gz

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.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.2
2
2
  Name: drf-iam
3
- Version: 0.2.0
3
+ Version: 0.2.3
4
4
  Summary: IAM-style roles and permissions for Django Rest Framework
5
5
  Home-page: https://github.com/tushar1328/drf-iam.git
6
6
  Author: Tushar Patel
@@ -26,9 +26,7 @@ def get_viewset_actions(viewset_cls):
26
26
  for name, method in inspect.getmembers(viewset_cls, predicate=inspect.isfunction):
27
27
  if hasattr(method, 'mapping'):
28
28
  for http_method in method.mapping:
29
- viewset_function = getattr(viewset_cls, name)
30
- if viewset_function.get("kwargs"):
31
- actions.add(f"{name}")
29
+ actions.add(f"{name}")
32
30
 
33
31
  return actions
34
32
 
@@ -54,7 +52,7 @@ def load_permissions_from_urls(**kwargs):
54
52
  urlpatterns = get_resolver().url_patterns
55
53
  for entry in extract_viewsets_from_urlpatterns(urlpatterns):
56
54
  viewset_cls = entry['viewset']
57
- basename = getattr(viewset_cls,"iam_policy_name") or viewset_cls.__name__.lower().replace('viewset', '')
55
+ basename = getattr(viewset_cls,"iam_policy_name", None) or viewset_cls.__name__.lower().replace('viewset', '')
58
56
  exclude_from_permissions = getattr(viewset_cls, "drf_iam_exclude_from_permissions", False)
59
57
  if exclude_from_permissions:
60
58
  continue
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.2
2
2
  Name: drf-iam
3
- Version: 0.2.0
3
+ Version: 0.2.3
4
4
  Summary: IAM-style roles and permissions for Django Rest Framework
5
5
  Home-page: https://github.com/tushar1328/drf-iam.git
6
6
  Author: Tushar Patel
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='drf-iam',
5
- version='0.2.0',
5
+ version='0.2.3',
6
6
  packages=find_packages(), # Automatically finds all sub-packages
7
7
  include_package_data=True, # Include non-Python files from MANIFEST.in
8
8
  install_requires=[
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes