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
@@ -134,7 +134,7 @@ export class User extends WithTimestamps implements IUser {
|
||||
return STATIC_SCOPE_MAP[this.globalRole?.name] ?? [];
|
||||
}
|
||||
|
||||
async hasGlobalScope(scope: Scope | Scope[], scopeOptions?: ScopeOptions): Promise<boolean> {
|
||||
hasGlobalScope(scope: Scope | Scope[], scopeOptions?: ScopeOptions): boolean {
|
||||
return hasScope(
|
||||
scope,
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ export class SharedCredentialsRepository extends Repository<SharedCredentials> {
|
||||
relations: ['credentials'],
|
||||
where: {
|
||||
credentialsId,
|
||||
...(!(await user.hasGlobalScope('credential:read')) ? { userId: user.id } : {}),
|
||||
...(!user.hasGlobalScope('credential:read') ? { userId: user.id } : {}),
|
||||
},
|
||||
});
|
||||
if (!sharedCredential) return null;
|
||||
|
||||
Reference in New Issue
Block a user