Tuesday, 2024-02-27

opendevreviewZhang Hua proposed openstack/horizon master: Fix projects/users list when a domain context is set  https://review.opendev.org/c/openstack/horizon/+/91032107:48
gansohi 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-L39C6311:49
gansoI 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
rdopierayou 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 on12:06
rdopierait's possibly that check is not passing something that is needed12:06
rdopierapossible*12:06
rdopierathe check is actually done here: https://github.com/openstack/horizon/blob/2b03b44f3adeea7e7a8aaab7777cccfa00614301/horizon/tables/actions.py#L130-L13712:08
gansordopiera: thanks! I will add logging to that function and see what's going on :)12:09
rdopierathe get_policy_target might need to be defined12:11
rdopierathe policy_check function is here https://github.com/openstack/horizon/blob/2b03b44f3adeea7e7a8aaab7777cccfa00614301/openstack_auth/policy.py#L14812:16
gansordopiera: 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 glance13:28
gansoI will push a commit adding a comment in the code about this13:28
opendevreviewRodrigo Barbieri proposed openstack/horizon master: [TRIVIAL] Add comment about policy override for images>launch button  https://review.opendev.org/c/openstack/horizon/+/91034013:42
gansothere we go ^13:42
opendevreviewRodrigo Barbieri proposed openstack/horizon master: [TRIVIAL] Add comment about policy override for images>launch button  https://review.opendev.org/c/openstack/horizon/+/91034013:50
opendevreviewJan Jasek proposed openstack/horizon master: pytest-based selenium tests add fix wait for volume state  https://review.opendev.org/c/openstack/horizon/+/91037817:49

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!