修改用户设置的新增用户的权限点击操作

This commit is contained in:
wangjiming
2026-08-17 16:04:04 +08:00
parent 6c1bf61ff7
commit 4e27b98a84
12 changed files with 1065 additions and 192 deletions

View File

@@ -6,6 +6,7 @@ from typing import Any
from app.api.v1.endpoints.platform import ok, fail
from app.db.platform_store import get_platform_store
from app.core.auth import get_current_user, has_resource_access, is_admin
from app.core.audit import audit_log, AuditActions
router = APIRouter(prefix="/resources", tags=["resource"])
@@ -25,6 +26,11 @@ def get_acl(resource_type: str, resource_id: str, current_user: dict = Depends(g
@router.put("/{resource_type}/{resource_id}/acl")
@audit_log(
action=AuditActions.GRANT_ACL,
target_type="",
detail_template="设置资源授权: {resource_type}/{resource_id}",
)
def set_acl(
resource_type: str,
resource_id: str,