catalog_permission.

manage_dashboard_permissions

manage_dashboard_permissions(workspace_id: str, dashboard_id: str, permissions_for_assignee: List[Union[CatalogPermissionsForAssigneeIdentifier, CatalogPermissionsForAssigneeRule]] ) -> None

Provide managing dashboard permissions for user and user groups.

Parameters

nametypedescription
workspace_idstrWorkspace identification string. e.g. "demo"
dashboard_idstrDashboard identification string. e.g. "campaign"
permissions_for_assigneeList[Union[CatalogPermissionsForAssigneeIdentifier, CatalogPermissionsForAssigneeRule]]Object containing list of users, user groups, or rules and desired dashboard permissions. Set empty list permissions for user/user group means remove dashboard permissions.

Returns

None

Example

manage_dashboard_permissions(
    workspace_id="demo",
    dashboard_id="sales",
    permissions_for_assignee=[
        CatalogPermissionsForAssigneeIdentifier(
            assignee_identifier=CatalogAssigneeIdentifier(id="demoGroup", type="userGroup"),
            permissions=["EDIT"],
        ),
        CatalogPermissionsForAssigneeRule(
            assignee_rule=CatalogAssigneeRule(type="allWorkspaceUsers"),
            permissions=["VIEW"],
        ),
    ],
)