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

Fix get items is array #110

Merged
merged 4 commits into from
Nov 13, 2023
Merged

Fix get items is array #110

merged 4 commits into from
Nov 13, 2023

Conversation

fratzinger
Copy link
Owner

Hey @romaincomtet, hey @Servaker,

sorry for the delay.... thanks for the bug report in #95 and the nice PR #109! This was clearly a bug in feathers-utils which I fixed in v3.1.3 see fratzinger/feathers-utils@2ec7427.

I reverted the 'result'/'automatic' change from #109 but kept the nice test.

I'll release it in a minute.

Closes #109, Fix #95.

Servaker and others added 4 commits November 13, 2023 15:31
In the 'authorizeAfter' function, an incorrect definition of the data
format when calling the 'feathersUtils.getItemsIsArray' function
resulted in the 'isArray' variable being incorrectly set to 'false',
which resulted in the 'getOrFind' variable being incorrectly set to
'get'. As a result, it affected incorrect data filtering when the user
requests data using the 'find' method with pagination enabled and
a restriction on allowed fields.
In the 'authorizeAfter' function, an incorrect definition of the data
format when calling the 'feathersUtils.getItemsIsArray' function
resulted in the 'isArray' variable being incorrectly set to 'false',
which resulted in the 'getOrFind' variable being incorrectly set to
'get'. As a result, it affected incorrect data filtering when the user
requests data using the 'find' method with pagination enabled and
a restriction on allowed fields.

Fix #95
@fratzinger fratzinger merged commit b05eb3f into main Nov 13, 2023
12 checks passed
@fratzinger fratzinger deleted the fix-getItemsIsArray branch November 13, 2023 14:02
@fratzinger
Copy link
Owner Author

Released as v2.1.1 https://github.com/fratzinger/feathers-casl/releases/tag/v2.1.1 🎉

@Servaker
Copy link
Contributor

Hi @fratzinger,

Thanks for the quick response and correction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

find rule with restricted field not working
2 participants