Skip to main content

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


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.11.tar.gz (31.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page