Thư viện xử lý kiểm tra quyền theo logic ABAC (Attribute-based access control)
Project description
ABAC Engine
Thư viện xử lý kiểm tra quyền theo logic ABAC (Attribute-based access control).
Cài đặt:
$ pip3 install m-abac
Sử dụng:
Kiểm tra user có quyền thao tác hay không:
from mobio.libs.abac import PolicyDecisionPoint
resource = "deal"
# action = "UpdateFromSale"
action = "ListFromSale"
pdb = PolicyDecisionPoint(resource=resource, action=action)
result = pdb.is_allowed()
if not result.get_allow_access():
# trả về lỗi không có quyền truy cập
Log - 1.0.0
- release sdk
Log - 1.0.2
- update sdk
Log - 1.0.3
- update cache
Log - 1.0.4
- update cache
Log - 1.0.5
- mm-dd operator
- update if exists
Log - 1.0.6
- update operator exists
Log - 1.0.7
- format date string using parse, string ignore case, accept check value None
Log - 1.0.11
- update abac check sub resource Product Holding
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
m_abac-1.0.15.tar.gz
(33.2 kB
view details)
File details
Details for the file m_abac-1.0.15.tar.gz
.
File metadata
- Download URL: m_abac-1.0.15.tar.gz
- Upload date:
- Size: 33.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b46bfb4bcb68a0811e1017be35b5f6e6e1f9ed1d1435f55e5ebcffaae97abdf8 |
|
MD5 | 726e504058fca187e139da35b9fe86a7 |
|
BLAKE2b-256 | 87fab3a91a9f8cb099ea74e4c9dd258985db52544ad75812dc6503c33a2fad76 |