abs-auth-rbac-core 0.1.19__py3-none-any.whl → 0.2.1__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.

Potentially problematic release.


This version of abs-auth-rbac-core might be problematic. Click here for more details.

@@ -31,4 +31,4 @@ class GovCasbinRule(BaseCasbinRule):
31
31
  if v is None:
32
32
  break
33
33
  arr.append(v)
34
- return ", ".join(arr)
34
+ return ", ".join(arr)
@@ -155,11 +155,12 @@ class RBACService:
155
155
  """
156
156
  with self.db() as session:
157
157
  try:
158
- if hasattr(permissions[0], "model_dump"):
159
- permission_objs = [Permission(**permission.model_dump()) for permission in permissions]
158
+ if hasattr(permissions,'model_dump'):
159
+ add_permissions = [Permission(**permission.model_dump()) for permission in permissions]
160
160
  else:
161
- permission_objs = [Permission(**permission) for permission in permissions]
162
- session.bulk_save_objects(permission_objs)
161
+ add_permissions = [Permission(**permission) for permission in permissions]
162
+
163
+ session.bulk_save_objects(add_permissions)
163
164
  session.commit()
164
165
  return add_permissions
165
166
  except Exception as e:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: abs-auth-rbac-core
3
- Version: 0.1.19
3
+ Version: 0.2.1
4
4
  Summary: RBAC and Auth core utilities including JWT token management.
5
5
  License: MIT
6
6
  Author: AutoBridgeSystems
@@ -5,7 +5,7 @@ abs_auth_rbac_core/auth/jwt_functions.py,sha256=9vhjWrxXdE8fVQ4FGrPj9y6PoSEsaeFo
5
5
  abs_auth_rbac_core/auth/middleware.py,sha256=Hn5EoDE2zEWXHXTgrSFgE85s0ivzFNTxYIqtgLBdtGE,1849
6
6
  abs_auth_rbac_core/models/__init__.py,sha256=9ImboxQ04XxRjd5o1RDBn465BOj3F2pahuVXF15NuqE,292
7
7
  abs_auth_rbac_core/models/base_model.py,sha256=AaWObslm8sTetv4H1Ia_gPpi_75uF5z1o7Et9WAvstU,612
8
- abs_auth_rbac_core/models/gov_casbin_rule.py,sha256=lzt837KLX1HiXsBH8Y43G-pPAKmm_ykhn-m13_VOUyI,999
8
+ abs_auth_rbac_core/models/gov_casbin_rule.py,sha256=9PpCQWg6TWeBvgjRcC2VxSSFMkNW-B9a4e2LmmDmmiY,1000
9
9
  abs_auth_rbac_core/models/permissions.py,sha256=op_6t3OKDGzQvroVhYgoM7g_umr7MD-ZABjk5HdTpB8,859
10
10
  abs_auth_rbac_core/models/rbac_model.py,sha256=GbgMA-lJoU__xYP7wCw2FB9P1ftMzRAU2sWyGnmqnt4,323
11
11
  abs_auth_rbac_core/models/role_permission.py,sha256=KQ7MGwFvHhXgWL73TGH_elfG0rTLj5Ct11EWi6ypNb8,414
@@ -17,11 +17,11 @@ abs_auth_rbac_core/models/user_role.py,sha256=20pqmtJPzlUrI9ulHGouk8XlFgrGG7I6ik
17
17
  abs_auth_rbac_core/rbac/__init__.py,sha256=oYjtpmfrkEbwWCBAWuRoU1fM4fCpBxkF_lwQrelK1As,79
18
18
  abs_auth_rbac_core/rbac/decorator.py,sha256=pEFAW0Nn2iE4KBctPhNOmO_VLeJFDX2V9v2LsCu6kHY,1824
19
19
  abs_auth_rbac_core/rbac/policy.conf,sha256=wghhhKxgZH0rPhh1QFrIpq9nevJT3s7OxxvXiU3zzuI,305
20
- abs_auth_rbac_core/rbac/service.py,sha256=abG09-jnjhhql_47kE7IDRbZTvP5-RiChCDyauugHQo,37253
20
+ abs_auth_rbac_core/rbac/service.py,sha256=YKur4trtTc0N-u3oqrfAJf9yLOTzSU-Pn2qh5drciqs,37250
21
21
  abs_auth_rbac_core/schema/__init__.py,sha256=v9xibJ8Wr9k0u6PEYNK0LCGUJD71SB5vxu9BZG0S7tM,46
22
22
  abs_auth_rbac_core/schema/permission.py,sha256=XvxPU68FY0PFgkF4GR2bSrzNvFB8c8OgY_d0JOJvMc8,203
23
23
  abs_auth_rbac_core/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
24
  abs_auth_rbac_core/util/permission_constants.py,sha256=cUEi6S9iNK4jwxevlb4ZNiBUcFSu4wlkN-p-O3-l7xs,95712
25
- abs_auth_rbac_core-0.1.19.dist-info/METADATA,sha256=WFk4zpwzAmPo988AG_7eBTmruz9xSbSLKsAFkSuoAYg,23270
26
- abs_auth_rbac_core-0.1.19.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
27
- abs_auth_rbac_core-0.1.19.dist-info/RECORD,,
25
+ abs_auth_rbac_core-0.2.1.dist-info/METADATA,sha256=QJwW0gy1QBOjN4oR2dT7EPEZLKBGvWMVQjo3JbVZ-sQ,23269
26
+ abs_auth_rbac_core-0.2.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
27
+ abs_auth_rbac_core-0.2.1.dist-info/RECORD,,