flash-oss / node_acl

Access control lists for node applications
MIT License
63 stars 9 forks source link

Annoying duplicates error #8

Closed tutyamxx closed 2 years ago

tutyamxx commented 2 years ago

I get this: insert into "acl_permissions" ("key", "value") values ($1, $2) - duplicate key value violates unique constraint "acl_permissions_pkey" when I try to create (using acl.allow) two identical roles, but with different names, and different permissions BUT the same resources. How do I even deal with this? 😕

zelucena commented 2 years ago

If that's just a SQL thing, insert ignore into "acl_permissions" ("key", "value") values ($1, $2) should do the trick.