Closed kbrock closed 1 month ago
I'm confused - read_only doesn't mean that we can't do things on a provider - it just means we can't change things in the database record itself. Can you give a specific model example of where this applies?
ok, so maybe this was an old branch with a dumb idea.
We have ReadOnly
for the following models:
miq_widget
miq_user_role
miq_policy
miq_policy_set
condition
classification
miq_alert
I thought we used that to show whether an action was supported in the ui.
So if the miq_widget.supports?(:update) == false if miq_widget.read_only?
just cleaning things up. not worth it right now
I thought we used that to show whether an action was supported in the ui.
Yeah you might be right? I think there was some conflating of "provider supports" type things and "miq supports" type things and that's why we're in this state.
Extracted from https://github.com/ManageIQ/manageiq/pull/23140
Goal
When asking a read only model
Model#supports?(:delete) (or
update) it will correctly respond no.Yes, we did have 2 false positives adding
read_only
behavior to models that used that column for another meaning. But these were resolved a long time ago.Previous PRs that addressed
ReadOnly
concerns22232
22857
22493