-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[permissions] Remove raw queries and restrict its usage #12360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 9 commits
9c9e5e4
37d85dd
1ad428e
cc4e698
b1f6c8b
14eb212
12ec234
5ac7f95
54bf395
01d2071
a3daec4
80b3050
3c233e2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,11 +3,11 @@ import { DataSource } from 'typeorm'; | |
const tableName = 'billingSubscription'; | ||
|
||
export const seedBillingSubscriptions = async ( | ||
workspaceDataSource: DataSource, | ||
dataSource: DataSource, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. clarifying name here and in other files as Datasource is not equal to WorkspaceDataSource, and does not require For workspaceDataSource we have implemented permissions and overriden createQueryBuilder(). DataSource is not restricted to a workspace and can perform operations on core + on any workspace. Its usage is restricted to "system" operations. |
||
schemaName: string, | ||
workspaceId: string, | ||
) => { | ||
await workspaceDataSource | ||
await dataSource | ||
.createQueryBuilder() | ||
.insert() | ||
.into(`${schemaName}.${tableName}`, [ | ||
|
Uh oh!
There was an error while loading. Please reload this page.