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
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-test-1.0.42.tar.gz
(32.4 kB
view hashes)
Built Distribution
Close
Hashes for m_abac_test-1.0.42-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97d6bc7fe0ab4a08b8f12247f08a0a83704ed3ba791196704daa89246fa98d4a |
|
MD5 | eea56d51ab7c3e4203773838761271f1 |
|
BLAKE2b-256 | 9937a248ee5c9c09c2480c97a918a2759b8291803cb798686153cf2645d37137 |