ci: Add lint rule for mandatory curly braces (#9348)

This commit is contained in:
Manuel
2024-10-16 19:57:42 +02:00
committed by GitHub
parent 714acaa906
commit dfd5a8edbf
22 changed files with 145 additions and 137 deletions

View File

@@ -142,7 +142,7 @@ const filterSensitiveData = (
object: any
) => {
let userId = null;
if (auth && auth.user) userId = auth.user.id;
if (auth && auth.user) { userId = auth.user.id; }
// replace protectedFields when using pointer-permissions
const perms =
@@ -1592,12 +1592,12 @@ class DatabaseController {
schema && schema.getClassLevelPermissions
? schema.getClassLevelPermissions(className)
: schema;
if (!perms) return null;
if (!perms) { return null; }
const protectedFields = perms.protectedFields;
if (!protectedFields) return null;
if (!protectedFields) { return null; }
if (aclGroup.indexOf(query.objectId) > -1) return null;
if (aclGroup.indexOf(query.objectId) > -1) { return null; }
// for queries where "keys" are set and do not include all 'userField':{field},
// we have to transparently include it, and then remove before returning to client