opendevreview | Merged openstack/horizon stable/yoga: Fix flavor id auto generation https://review.opendev.org/c/openstack/horizon/+/866909 | 01:42 |
---|---|---|
*** ozzzo1 is now known as ozzzo | 08:12 | |
zigo | Hi there! We modified the Designate policy to only allow people with "dnsmember" role to be able to use Designate's API. | 11:58 |
zigo | Now, we would like to only enable the Designate panel if the user has the "dnsmember" role. | 11:58 |
zigo | How do I check a user's role in Horizon then? Would it be possible to add such code in the local/enable thingy of Designate dashbaord? | 11:58 |
zigo | vishalmanchanda: amotoki: ^ | 11:58 |
rdopiera | zigo: the enable scripts run when horizon is started, they have no idea about the user | 12:06 |
zigo | Oh ... :/ | 12:07 |
rdopiera | you can have code that checks the user in the panel itself: https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/identity/domains/panel.py#L26 | 12:08 |
vishalmanchanda | zigo: For checking the role for a member in horizon Go to Identity->Users->Select User(click on detailView for that user)->open Role assignments tab | 12:09 |
rdopiera | vishalmanchanda: I think they are asking about checking it in code | 12:10 |
zigo | Yeah... | 12:10 |
zigo | We want to hide all DNS operation if the user has no "dnsmember" role. | 12:10 |
vishalmanchanda | ok | 12:11 |
rdopiera | zigo: you would probably use this? https://github.com/openstack/horizon/blob/master/openstack_dashboard/api/keystone.py#L664 | 12:12 |
rdopiera | or one of the functions further down in that file | 12:13 |
zigo | Thanks a lot! We'll investigate it. | 12:13 |
rdopiera | I see we use keystone.is_domain_admin in some places, might be worthwhile looking at how that is implemented | 12:14 |
rdopiera | zigo: the dashboard object also has a similar permission check function | 12:20 |
rdopiera | https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/identity/dashboard.py#L26 | 12:21 |
opendevreview | Andrey Kurilin proposed openstack/horizon master: DNM: Restore old behaviour of nova.createServer method https://review.opendev.org/c/openstack/horizon/+/871285 | 14:45 |
zigo | Finally, we implemented a policy in /etc/openstack-dashboard/policy/designate_policy.json, loaded it with POLICY_FILES in local_settings.py, and then added the policy in the panels.py of designate-dashboard. | 14:51 |
zigo | Is this the way? :) | 14:51 |
zigo | (we're in Victoria if that maters...) | 14:51 |
opendevreview | Andrey Kurilin proposed openstack/horizon master: Fix applying OPENSTACK_SERVER_DEFAULT_USER_DATA value https://review.opendev.org/c/openstack/horizon/+/868083 | 14:54 |
opendevreview | Jan Jasek proposed openstack/horizon stable/zed: Fix delete image tests. https://review.opendev.org/c/openstack/horizon/+/871298 | 16:03 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!