fix: Incorrect type passed to assert_permissions in materialize endpoints by robhowley · Pull Request #4727 · feast-dev/feast
Conversation
What this PR does / why we need it:
fixes permissions assertion in /materialize and /materialize-incremental, see attached git issue
Which issue(s) this PR fixes:
Fixes #4726
Misc
Comment on lines 253 to 261
| for feature_view in request.feature_views or []: | ||
| # TODO: receives a str for resource but isn't in the Union. is str actually allowed? | ||
| assert_permissions( | ||
| resource=feature_view, # type: ignore | ||
| resource=_get_feast_object(feature_view, True), | ||
| actions=[AuthzedAction.WRITE_ONLINE], | ||
| ) |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix: we don't assert_permissions on the str name of the feature_view, but on the FeastObject itself
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters