fix: enable API key management of workspace views + fix permission bypass vulnerability (#16768)

Fixes #16739

- Remove empty string coercion in createCoreView that caused PostgreSQL
UUID errors for API keys
- Add permission check allowing API keys with VIEWS permission to manage
workspace views they created

API keys with 'Manage Views' permission can now create, update, and
delete workspace views via both GraphQL and REST APIs.
This commit is contained in:
eeeggg
2025-12-23 02:06:47 -06:00
committed by GitHub
parent 79998ef8fc
commit 65dced14ff
26 changed files with 69 additions and 20 deletions
@@ -153,7 +153,7 @@ export class ViewResolver {
return await this.viewService.createOne({
createViewInput: input,
workspaceId: workspace.id,
createdByUserWorkspaceId: userWorkspaceId ?? '',
createdByUserWorkspaceId: userWorkspaceId,
});
}