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_test-1.0.48.tar.gz
(32.7 kB
view hashes)