ci: Remove unnecessary async/await, enable await-thenable linting rule (no-changelog) (#8076)
## Summary We accidentally made some functions `async` in https://github.com/n8n-io/n8n/pull/7846 This PR reverts that change. ## Review / Merge checklist - [x] PR title and summary are descriptive.
This commit is contained in:
committed by
GitHub
parent
a7ffed245a
commit
464b565283
@@ -32,7 +32,7 @@ export class PermissionChecker {
|
||||
relations: ['globalRole'],
|
||||
});
|
||||
|
||||
if (await user.hasGlobalScope('workflow:execute')) return;
|
||||
if (user.hasGlobalScope('workflow:execute')) return;
|
||||
|
||||
// allow if all creds used in this workflow are a subset of
|
||||
// all creds accessible to users who have access to this workflow
|
||||
|
||||
@@ -58,7 +58,7 @@ export function rightDiff<T1, T2>(
|
||||
* Build a `where` clause for a TypeORM entity search,
|
||||
* checking for member access if the user is not an owner.
|
||||
*/
|
||||
export async function whereClause({
|
||||
export function whereClause({
|
||||
user,
|
||||
entityType,
|
||||
globalScope,
|
||||
@@ -70,10 +70,10 @@ export async function whereClause({
|
||||
globalScope: Scope;
|
||||
entityId?: string;
|
||||
roles?: string[];
|
||||
}): Promise<WhereClause> {
|
||||
}): WhereClause {
|
||||
const where: WhereClause = entityId ? { [entityType]: { id: entityId } } : {};
|
||||
|
||||
if (!(await user.hasGlobalScope(globalScope))) {
|
||||
if (!user.hasGlobalScope(globalScope)) {
|
||||
where.user = { id: user.id };
|
||||
if (roles?.length) {
|
||||
where.role = { name: In(roles) };
|
||||
|
||||
Reference in New Issue
Block a user