Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
11-15-2021 07:49 PM
Hi,
Using the Neo4j Graph Plateform library, is it possible to access the context (graphql) in auth rules.
I know I can access $jwt and do something like this :
{ allow: { id: "$jwt.sub" }
But I would like to do something like this :
allow: { OR: [{ id: "$jwt.sub" }, { adminOverride: true }] }
And pass this config adminOverride
like this :
const User = context.ogm.model("User")
const [existing] = await User.update({
where: { id: payload.sub },
context: { ...context, adminOverride: true },
update: { password: hash },
})
Thanks for your help!
All the sessions of the conference are now available online