File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
nova/api/openstack/compute Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,8 @@ def _get_default_networks(self):
7171 @wsgi .expected_errors (())
7272 def index (self , req ):
7373 context = req .environ ['nova.context' ]
74- context .can (tn_policies .POLICY_NAME % 'list' )
74+ context .can (tn_policies .POLICY_NAME % 'list' ,
75+ target = {'project_id' : context .project_id })
7576 networks = list (self .network_api .get_all (context ))
7677 if not self ._default_networks :
7778 self ._refresh_default_networks ()
@@ -82,7 +83,8 @@ def index(self, req):
8283 @wsgi .expected_errors (404 )
8384 def show (self , req , id ):
8485 context = req .environ ['nova.context' ]
85- context .can (tn_policies .POLICY_NAME % 'show' )
86+ context .can (tn_policies .POLICY_NAME % 'show' ,
87+ target = {'project_id' : context .project_id })
8688 try :
8789 network = self .network_api .get (context , id )
8890 except exception .NetworkNotFound :
You can’t perform that action at this time.
0 commit comments