Permissions & Scopes
Định nghĩa OAuth2 scope, role mặc định, và ma trận phân quyền Service × Role áp dụng cho toàn bộ Daisan API.
Roles
6
Scopes
14
7 high-risk
Users assigned
82
Services covered
12
Roles
Vai trò mặc định trong Daisan Admin. Mỗi role có một bộ scope được phép sử dụng.
Super Admin
Toàn quyền hệ thống
API Manager
Tạo/duyệt API, manage consumer
Backend Dev
Đọc/sửa endpoint dev/staging
DevOps
Deploy, monitoring, logs
Partner Dev
External — chỉ public API
Business Owner
Read-only analytics
Scope catalog
OAuth2 scopes — định danh quyền truy cập chi tiết.
| Scope | Category | Description | Consumers | APIs | Risk |
|---|---|---|---|---|---|
product:read | Product | Đọc dữ liệu sản phẩm | 12 | 4 | Low |
product:write | Product | Tạo, sửa, xoá sản phẩm | 4 | 3 | High |
order:read | Order | Đọc đơn hàng | 8 | 2 | Low |
order:write | Order | Tạo và cập nhật đơn hàng | 5 | 2 | High |
inventory:read | Inventory | Truy vấn tồn kho | 9 | 3 | Low |
inventory:write | Inventory | Cập nhật tồn kho | 3 | 2 | High |
customer:read | CRM | Đọc thông tin khách hàng | 6 | 2 | Low |
customer:write | CRM | Cập nhật khách hàng | 2 | 1 | High |
search:read | Search | Sử dụng search API | 14 | 1 | Low |
ads:write | Ads | Quản lý quảng cáo | 2 | 1 | High |
report:read | Report | Xem báo cáo | 5 | 1 | Low |
integration:execute | Integration | Thực thi tích hợp 3rd-party | 4 | 3 | High |
webhook:manage | Webhook | Quản lý webhook | 3 | 1 | Low |
api:admin | Admin | Toàn quyền admin | 2 | 12 | High |
Permission matrix
Service × Role — Full / Read / None. Có thể chỉnh sửa trực tiếp.
| Service | Super Admin | API Manager | Backend Dev | DevOps | Partner Dev | Business Owner |
|---|---|---|---|---|---|---|
PRD Product API Product/PIM | Full | Full | Full | Read | Read | Read |
SRC Search API Search | Full | Full | Full | Read | Read | Read |
ORD Order API Order | Full | Full | Full | Read | — | Read |
INV Inventory API Inventory | Full | Full | Full | Read | — | Read |
CRM CRM API CRM | Full | Full | Read | — | — | Read |
ODO Odoo Integration API Integration | Full | Full | Read | Full | — | — |
APY Apify Import API Integration | Full | Full | Full | Full | — | — |
ZLO Zalo Integration API Integration | Full | Full | Read | Read | — | Read |
PAY Payment API Commerce | Full | Full | Read | Read | — | Read |
SHP Shipping API Commerce | Full | Full | Full | Read | Read | Read |
AI AI Chat API AI | Full | Full | Full | Read | Read | Read |
RPT Report API Report | Full | Full | Read | Read | — | Full |
Legend: Full — đọc + ghi Read — chỉ đọc None — không quyền
Recent permission changes
Audit log — mọi thay đổi về role, scope và quyền truy cập.
minh.tran@daisan.vn granted scope GHN Webhook Receiver
shipping:write· 2 phút trướcsystem revoked role ex-partner@vendor.io
Partner Dev· 12 phút trước
ha.nguyen@daisan.vn created role Marketing Analyst
· 1 giờ trước
duc.pham@daisan.vn elevated to Super Admin
Super Admin· 3 giờ trước
system auto-expired key Mobile App Staging
api:admin· 5 giờ trướclinh.vu@daisan.vn updated scope payment:execute
payment:execute· Hôm qua, 16:42