adds ability to override depth on auth user
This commit is contained in:
@@ -35,6 +35,7 @@ module.exports = ({ operations }, { Model, config }) => {
|
||||
},
|
||||
req,
|
||||
overrideAccess: true,
|
||||
depth: config.auth.depth,
|
||||
});
|
||||
|
||||
if (userQuery.docs && userQuery.docs.length > 0) {
|
||||
|
||||
@@ -37,11 +37,13 @@ module.exports = ({ config, collections, operations }) => {
|
||||
equals: token.email,
|
||||
};
|
||||
}
|
||||
|
||||
const userQuery = await operations.collections.find({
|
||||
where,
|
||||
collection,
|
||||
req,
|
||||
overrideAccess: true,
|
||||
depth: collection.config.auth.depth,
|
||||
});
|
||||
|
||||
if (userQuery.docs && userQuery.docs.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user