permissionScenario(fmt.Sprintf("and parent folder has %s with permission to %s",pt.String(),permission.String()),childDashboardID,sc,folderPermissionList,func(sc*scenarioContext){
CASE WHEN (da.dashboard_id = -1 AND d.folder_id > 0) OR da.dashboard_id = d.folder_id THEN `+dialect.BooleanStr(true)+` ELSE `+falseStr+` END AS inherited
FROM dashboard as d
LEFT JOIN dashboard folder on folder.id = d.folder_id