opendevreview | Zhang Hua proposed openstack/horizon master: Fix projects/users list when a domain context is set https://review.opendev.org/c/openstack/horizon/+/910321 | 07:48 |
---|---|---|
ganso | hi folks. I have a customer that is trying to hiding the Launch button from the images page, but it is not working despite adding the policy specified at [1] in both the nova and glance custom policy files. Hiding all other buttons worked, except this one. Any ideas? maybe we are doing something wrong? | 11:49 |
ganso | [1] https://github.com/openstack/horizon/blob/2b03b44f3adeea7e7a8aaab7777cccfa00614301/openstack_dashboard/dashboards/project/images/images/tables.py#L39C34-L39C63 | 11:49 |
ganso | I suspect it may be a bug where the images page cannot properly work with a compute policy. Maybe it could be changed to a glance policy? | 11:50 |
rdopiera | you might be right, as far as I know the policy engine only really checks the permissions correctly when you provide it with all the additional metadata that it might need, such as the owners of all things involved and so on | 12:06 |
rdopiera | it's possibly that check is not passing something that is needed | 12:06 |
rdopiera | possible* | 12:06 |
rdopiera | the check is actually done here: https://github.com/openstack/horizon/blob/2b03b44f3adeea7e7a8aaab7777cccfa00614301/horizon/tables/actions.py#L130-L137 | 12:08 |
ganso | rdopiera: thanks! I will add logging to that function and see what's going on :) | 12:09 |
rdopiera | the get_policy_target might need to be defined | 12:11 |
rdopiera | the policy_check function is here https://github.com/openstack/horizon/blob/2b03b44f3adeea7e7a8aaab7777cccfa00614301/openstack_auth/policy.py#L148 | 12:16 |
ganso | rdopiera: found out that the rule gets renamed to "compute:create", and then it needs to be added to the nova override file as "compute:create: <rule>", which is typically not expected according to the nova definition, but it works for glance | 13:28 |
ganso | I will push a commit adding a comment in the code about this | 13:28 |
opendevreview | Rodrigo Barbieri proposed openstack/horizon master: [TRIVIAL] Add comment about policy override for images>launch button https://review.opendev.org/c/openstack/horizon/+/910340 | 13:42 |
ganso | there we go ^ | 13:42 |
opendevreview | Rodrigo Barbieri proposed openstack/horizon master: [TRIVIAL] Add comment about policy override for images>launch button https://review.opendev.org/c/openstack/horizon/+/910340 | 13:50 |
opendevreview | Jan Jasek proposed openstack/horizon master: pytest-based selenium tests add fix wait for volume state https://review.opendev.org/c/openstack/horizon/+/910378 | 17:49 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!