mirror of
https://github.com/langgenius/dify.git
synced 2026-11-13 06:41:07 +08:00
10 lines
418 B
Python
10 lines
418 B
Python
from extensions.ext_application_services import application_services
|
|
from services.rbac.contracts import RBACResourceType
|
|
|
|
|
|
def get_app_permission_keys(tenant_id: str, account_id: str | None, app_id: str) -> list[str]:
|
|
permission_keys_map = application_services().rbac.members.resource_permissions(
|
|
tenant_id, account_id, RBACResourceType.APP, [app_id]
|
|
)
|
|
return permission_keys_map.get(app_id, [])
|