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 @@ -70,7 +70,8 @@ def __init__(self, network_api=None):
7070 @wsgi .expected_errors (())
7171 def index (self , req ):
7272 context = req .environ ['nova.context' ]
73- context .can (net_policies .POLICY_ROOT % 'list' )
73+ context .can (net_policies .POLICY_ROOT % 'list' ,
74+ target = {'project_id' : context .project_id })
7475 networks = self .network_api .get_all (context )
7576 result = [network_dict (context , net_ref ) for net_ref in networks ]
7677 return {'networks' : result }
@@ -79,7 +80,8 @@ def index(self, req):
7980 @wsgi .expected_errors (404 )
8081 def show (self , req , id ):
8182 context = req .environ ['nova.context' ]
82- context .can (net_policies .POLICY_ROOT % 'show' )
83+ context .can (net_policies .POLICY_ROOT % 'show' ,
84+ target = {'project_id' : context .project_id })
8385
8486 try :
8587 network = self .network_api .get (context , id )
You can’t perform that action at this time.
0 commit comments