最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

typescript - With CASL ABAC, is it able to parse Bigint? - Stack Overflow

programmeradmin5浏览0评论

The object being passed as a subject is below:

permissions.can("read", subject("appprofile", profile)))

The profile being checked looks like this:

{
  name: "Dave",
  id: 1n, <--- the bigint from Prisma
}

the JSON being used in createMongoAbility is like this:

 [
  {
    action: "read",
    subject: "appprofile",
    conditions: {
      id: "1",
    },
  }
]

... but the check fails. I'm assuming its a bigint parsing issue in CASL or am I on the wrong track?

发布评论

评论列表(0)

  1. 暂无评论