Authing DocsDocuments
Concept
workflow
Guides
Development Integration
Application integration
Concept
workflow
Guides
Development Integration
Application integration
Old Version
Development Integration
  • Single Sign-On (SSO)
  • Login component

  • JavaScript/Node.js

  • Java / Kotlin

  • Python

    • User Authentication Module

    • Management Module

      • Manage resources and permissions
      • Management application
      • Management groups
      • Management organization
      • Management strategy
      • Management subject certification
      • Management role
      • Management log statistics
      • Management User Custom Fields
      • Management user pool configuration
      • Management user
      • Management registration white list
  • C#

  • PHP

  • Go

  • Ruby
  • Android

  • iOS

  • Flutter

  • React Native
  • WeChat Mini Program
  • WeChat webpage authorization
  • Framework Integration
  • Error code
  1. Development Integration
  2. /
  3. Python
  4. /
  5. Management Module
  6. /
  7. Manage resources and permissions

¶ AclManagementClient

Update Time: 2025-02-18 09:00:47
Edit

Authing builds an authorization model based on PBAC (Policy Based Access Control), which can be combined with RBAC (Role Based Access Control) to achieve high flexible and refined privilege control. This client abstracts this model into two methods: allow and isAllowed.

¶ Allow a user to perform an operation on a resource

AclManagementClient().allow(userId, action, resource)

Allow a user to perform an operation on a resource

¶ Parameters:

  • userId <string> User ID
  • action <string> The name of the action, which is recommended to use the format of <resourceType>:<actionName> , such as books:edit, books:list
  • resource <string> Resource name, which must be in the format of <resourceType>:<resourceId> or _, such as _,books:123,books:\*

¶ Example:

# 允许某个用户操作某个角色
management_client.acl.allow(
    resource='books:123',
    action='books:edit',
    userId='60b4a136d9xxxxcc3d87e55a'
)

# 允许某个角色操作某个角色
management_client.acl.allow(
    resource='books:*',
    action='books:edit',
    role='ROLE'
)

¶ Get whether a user has operation authority of a resource

AclManagementClient().is_allowed(userId, action, resource)

Get whether a user has operation authority of a resource

¶ Parameters:

  • userId <string> User ID
  • action <string> The name of the action, which is recommended to use the format of <resourceType>:<actionName> , such as books:edit, books:list
  • resource <string> Resource name, which must be in the format of <resourceType>:<resourceId> or _, such as _,books:123,books:\*

¶ Example:

is_allowed = management_client.acl.is_allowed(
    userId='60b4a136d9xxxxcc3d87e55a',
    resource='books:*',
    action='books:edit',
)
Prev: Management Module Next: Management application
  • Allow a user to perform an operation on a resource
  • Get whether a user has operation authority of a resource

User identity management

Integrated third-party login
Mobile phone number flash check (opens new window)
Universal login form component
Custom authentication process

Enterprise internal management

Single Sign On
Multi-factor Authentication
Authority Management

Developers

Development Document
Framework Integration
Blog (opens new window)
GitHub (opens new window)
Community User Center (opens new window)

Company

400 888 2106
sales@authing.cn
16 / F, Block B, NORTH STAR CENTURY CENTER, Beijing(Total)
room 406, 4th floor, zone B, building 1, No. 200, Tianfu Fifth Street, Chengdu(branch)

Beijing ICP No.19051205-1

© Beijing Steamory Technology Co.