mirror of
https://github.com/langgenius/dify.git
synced 2026-06-25 22:31:10 +08:00
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:
parent
d349e892f4
commit
9fc2925b00
@ -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
|
||||
|
||||
@ -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."""
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user