Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Owner cannot be updated, only set during creation #1370

Open
VMelnalksnis opened this issue Sep 15, 2024 · 1 comment
Open

Owner cannot be updated, only set during creation #1370

VMelnalksnis opened this issue Sep 15, 2024 · 1 comment
Labels
area:api type:bug Something isn't working

Comments

@VMelnalksnis
Copy link
Owner

Describe the bug
None of the Update.sql queries actually set the onwer_id column, so it's not possible to update the owner.

To Reproduce
Steps to reproduce the behavior:

  1. Add owner_id = @OwnerId to any Update.sql file
  2. See that access control tests fail because owner has been changed and the original owner cannot read the entities

Expected behavior
The owner is updated as any other column

@VMelnalksnis VMelnalksnis added type:bug Something isn't working area:api labels Sep 15, 2024
@VMelnalksnis
Copy link
Owner Author

It's been some time, so I guess I've forgotten what I've written; probably have to add some documentation regarding this. Anyway, looks like like the owner can only be updated for 'root' entities - accounts, transactions and loans. For all other entities it's only possible to set it during creation (though I'm not sure if that should even be possible). Since the access is inherited from root entities, it can be modified via those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:api type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant