You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Upserting policies, with the same IDs/data, to the memory database, causes duplicate records, instead of updating.
To Reproduce
Steps to reproduce the behavior:
Run DATABASE_URL=memory go run main.go serve
PUT the same policy more than once
PUT /engines/acp/ory/exact/policies HTTP/1.1
Host: localhost:4466
Content-Type: application/json
{
"actions": [
"delete"
],
"description": "Delete first blog post",
"effect": "allow",
"id": "alice-deletes-blog-post",
"resources": [
"blog_posts:my-first-blog-post"
],
"subjects": [
"alice"
]
}
Get the list of policies and withness duplicate entries
GET /engines/acp/ory/exact/policies HTTP/1.1
Host: localhost:4466
Content-Type: application/json
Expected behavior
Upserting a policy will update a pre-existing policy based on the ID. If this is a limitation of the memory database, I would expect some sort of warning.
Describe the bug
Upserting policies, with the same IDs/data, to the memory database, causes duplicate records, instead of updating.
To Reproduce
Steps to reproduce the behavior:
DATABASE_URL=memory go run main.go serve
Expected behavior
Upserting a policy will update a pre-existing policy based on the ID. If this is a limitation of the memory database, I would expect some sort of warning.
Version:
The text was updated successfully, but these errors were encountered: