feat: delete member delete rbac binding (#37904)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
wangxiaolei 2026-06-25 10:08:07 +08:00 committed by GitHub
parent d349e892f4
commit 9fc2925b00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 0 deletions

View File

@ -1788,6 +1788,9 @@ class TenantService:
account_id,
)
if dify_config.RBAC_ENABLED:
RBACService.MemberRoles.delete_rbac_bindings(tenant_id=tenant.id, account_id=account_id)
@staticmethod
def update_member_role(
tenant: Tenant, member: Account, new_role: str, operator: Account, *, session: scoped_session | Session

View File

@ -1685,6 +1685,17 @@ class RBACService:
)
return MemberRolesResponse.model_validate(data or {})
@staticmethod
def delete_rbac_bindings(tenant_id: str, account_id: str):
data = _inner_call(
"DELETE",
f"{_INNER_PREFIX}/members/rbac-bindings",
tenant_id=tenant_id,
account_id=account_id,
params={"account_id": account_id},
)
return data
class CheckAccess:
"""Call the ``/inner/api/rbac/check-access`` endpoint."""