abs-auth-rbac-core 0.3.2__tar.gz → 0.3.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.
Potentially problematic release.
This version of abs-auth-rbac-core might be problematic. Click here for more details.
- {abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/PKG-INFO +2 -1
- abs_auth_rbac_core-0.3.3/abs_auth_rbac_core/repository/__init__.py +4 -0
- abs_auth_rbac_core-0.3.3/abs_auth_rbac_core/repository/permission_repository.py +12 -0
- abs_auth_rbac_core-0.3.3/abs_auth_rbac_core/repository/role_repository.py +18 -0
- abs_auth_rbac_core-0.3.3/abs_auth_rbac_core/service/__init__.py +4 -0
- abs_auth_rbac_core-0.3.3/abs_auth_rbac_core/service/permission_service.py +15 -0
- abs_auth_rbac_core-0.3.3/abs_auth_rbac_core/service/role_service.py +18 -0
- {abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/pyproject.toml +3 -2
- {abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/README.md +0 -0
- {abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/__init__.py +0 -0
- {abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/auth/__init__.py +0 -0
- {abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/auth/auth_functions.py +0 -0
- {abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/auth/jwt_functions.py +0 -0
- {abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/auth/middleware.py +0 -0
- {abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/models/__init__.py +0 -0
- {abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/models/base_model.py +0 -0
- {abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/models/gov_casbin_rule.py +0 -0
- {abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/models/permissions.py +0 -0
- {abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/models/rbac_model.py +0 -0
- {abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/models/role_permission.py +0 -0
- {abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/models/roles.py +0 -0
- {abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/models/seeder/permission_seeder.py +0 -0
- {abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/models/user.py +0 -0
- {abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/models/user_permission.py +0 -0
- {abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/models/user_role.py +0 -0
- {abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/rbac/__init__.py +0 -0
- {abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/rbac/decorator.py +0 -0
- {abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/rbac/policy.conf +0 -0
- {abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/rbac/service.py +0 -0
- {abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/schema/__init__.py +0 -0
- {abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/schema/permission.py +0 -0
- {abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/util/__init__.py +0 -0
- {abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/util/permission_constants.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: abs-auth-rbac-core
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3
|
|
4
4
|
Summary: RBAC and Auth core utilities including JWT token management.
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: AutoBridgeSystems
|
|
@@ -12,6 +12,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.12
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.13
|
|
14
14
|
Requires-Dist: abs-exception-core (>=0.2.0,<0.3.0)
|
|
15
|
+
Requires-Dist: abs-repository-core (>=0.3.0,<0.4.0)
|
|
15
16
|
Requires-Dist: abs-utils (>=0.4.1,<0.5.0)
|
|
16
17
|
Requires-Dist: casbin (>=1.41.0,<2.0.0)
|
|
17
18
|
Requires-Dist: casbin-redis-watcher (>=1.3.0,<2.0.0)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from typing import Any, List, Optional, Callable
|
|
2
|
+
from sqlalchemy.orm import joinedload
|
|
3
|
+
from contextlib import AbstractContextManager
|
|
4
|
+
from sqlalchemy.orm import Session
|
|
5
|
+
from abs_repository_core.repository.base_repository import BaseRepository
|
|
6
|
+
from abs_repository_core.schemas.base_schema import FindBase, FindUniqueValues
|
|
7
|
+
from abs_auth_rbac_core.models.permissions import Permission
|
|
8
|
+
|
|
9
|
+
class PermissionRepository(BaseRepository):
|
|
10
|
+
def __init__(self, db: Callable[..., Session]):
|
|
11
|
+
self.db = db
|
|
12
|
+
super().__init__(db, Permission)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from typing import Any, List, Optional, Callable
|
|
2
|
+
from sqlalchemy.orm import joinedload
|
|
3
|
+
from contextlib import AbstractContextManager
|
|
4
|
+
from sqlalchemy.orm import Session
|
|
5
|
+
from abs_repository_core.repository.base_repository import BaseRepository
|
|
6
|
+
from abs_auth_rbac_core.models.roles import Role
|
|
7
|
+
from abs_exception_core.exceptions import NotFoundError
|
|
8
|
+
from abs_repository_core.schemas import FilterSchema, FindBase
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class RoleRepository(BaseRepository):
|
|
12
|
+
def __init__(self, db: Callable[..., Session]):
|
|
13
|
+
self.db = db
|
|
14
|
+
super().__init__(db, Role)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
from typing import Any, List, Optional
|
|
2
|
+
from abs_repository_core.services.base_service import BaseService
|
|
3
|
+
from abs_repository_core.schemas.base_schema import FindBase, FindUniqueValues
|
|
4
|
+
from abs_auth_rbac_core.models.roles import Role
|
|
5
|
+
from abs_auth_rbac_core.repository.permission_repository import PermissionRepository
|
|
6
|
+
from pydantic import BaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class PermissionService(BaseService):
|
|
10
|
+
def __init__(self, repository:PermissionRepository):
|
|
11
|
+
super().__init__(repository)
|
|
12
|
+
self.repository = repository
|
|
13
|
+
|
|
14
|
+
def list_permissions(self, schema: FindBase, eager: bool = True):
|
|
15
|
+
return self.repository.read_by_options(schema, eager)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from typing import Any, List, Optional
|
|
2
|
+
from abs_repository_core.services.base_service import BaseService
|
|
3
|
+
from abs_repository_core.schemas.base_schema import FindBase, FindUniqueValues
|
|
4
|
+
from abs_auth_rbac_core.models.roles import Role
|
|
5
|
+
from abs_auth_rbac_core.repository.role_repository import RoleRepository
|
|
6
|
+
from pydantic import BaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class RoleService(BaseService):
|
|
10
|
+
def __init__(self, repository:RoleRepository):
|
|
11
|
+
self.repository = repository
|
|
12
|
+
super().__init__(repository)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def list_roles(self, schema: FindBase, eager: bool = True):
|
|
16
|
+
return self.repository.read_by_options(schema, eager)
|
|
17
|
+
|
|
18
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "abs-auth-rbac-core"
|
|
3
|
-
version = "0.3.
|
|
3
|
+
version = "0.3.3"
|
|
4
4
|
description = "RBAC and Auth core utilities including JWT token management."
|
|
5
5
|
authors = [
|
|
6
6
|
{name = "AutoBridgeSystems", email = "info@autobridgesystems.com"}
|
|
@@ -18,7 +18,8 @@ dependencies = [
|
|
|
18
18
|
"casbin-sqlalchemy-adapter (>=1.4.0,<2.0.0)",
|
|
19
19
|
"psycopg2-binary (>=2.9.10,<3.0.0)",
|
|
20
20
|
"casbin-redis-watcher (>=1.3.0,<2.0.0)",
|
|
21
|
-
"abs-utils (>=0.4.1,<0.5.0)"
|
|
21
|
+
"abs-utils (>=0.4.1,<0.5.0)",
|
|
22
|
+
"abs-repository-core (>=0.3.0,<0.4.0)"
|
|
22
23
|
]
|
|
23
24
|
|
|
24
25
|
[build-system]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/auth/auth_functions.py
RENAMED
|
File without changes
|
{abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/auth/jwt_functions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/models/base_model.py
RENAMED
|
File without changes
|
{abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/models/gov_casbin_rule.py
RENAMED
|
File without changes
|
{abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/models/permissions.py
RENAMED
|
File without changes
|
{abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/models/rbac_model.py
RENAMED
|
File without changes
|
{abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/models/role_permission.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/models/user_permission.py
RENAMED
|
File without changes
|
{abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/models/user_role.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{abs_auth_rbac_core-0.3.2 → abs_auth_rbac_core-0.3.3}/abs_auth_rbac_core/schema/permission.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|