manila/manila
Mohammed Naser 947315f090 share_networks: enable project_only API only
At the moment, the share_network database API which the web
API layer interacts with directly does not have any checking
for project_id which means that a user has the ability to run
operations against any other share_network if they have the ID.

This patch implements the usage of project_only in the database
query which ensures that administrators still have the behaviour
of getting any share network they want, but users can only pull
up those which are part of their context/authenticated project.

This patch also adjusts a few other tests due to the fact that
the existing tests would run a lot of inserts with a different
project_id than the context, which is not allowed in this new
API behaviour.  Therefore, the instances that involved projects
different than the context were converted to elevated ones.

There was also an instance where they were being created with a
project_id that did not match the fake context, therefore the
context was adjusted accordingly as well.

Closes-Bug: #1861485
Change-Id: Id67a939a475c4ac06d546b7e095bd10f1a6d2619
2020-03-10 15:26:39 -04:00
..
api Fix database loading for some resources 2020-02-13 14:39:24 +00:00
cmd Drop param2id() from cmd/manage.py 2019-01-03 14:10:01 +01:00
common Allow configuring availability_zones in share types 2019-02-13 17:39:48 +00:00
compute Fix error that failed to get image for booting server 2019-12-13 01:31:22 +00:00
data Remove support for ``data_node_access_ip`` 2019-09-09 14:45:30 +00:00
db share_networks: enable project_only API only 2020-03-10 15:26:39 -04:00
hacking Fix the duplicate hacking check M312 and H203 2017-08-13 08:01:42 +08:00
message Add asynchronous error info into messages when share extend error 2020-02-04 21:28:16 +08:00
network Introduce noop interface driver 2020-02-04 10:57:45 +01:00
policies Add share network with multiple subnets 2019-09-13 11:27:18 -03:00
scheduler Make extra_specs value as case-insensitive 2019-12-11 10:39:08 +09:00
share Merge "[Unity]: Failed to delete cifs share if wrong access set" 2020-02-26 13:45:45 +00:00
share_group Fix parameters passed to exception 2019-03-19 17:40:40 +08:00
testing [ussuri][goal] Drop python2.7 support 2019-12-08 19:32:52 -08:00
tests share_networks: enable project_only API only 2020-03-10 15:26:39 -04:00
volume Fix parameters passed to exception 2019-03-19 17:40:40 +08:00
wsgi [pylint] Fix/ignore pylint errors in non-test modules 2019-02-25 17:23:15 +00:00
__init__.py Removed ignored checks from tox.ini and fixed pep8 issues 2016-02-14 14:56:55 +02:00
context.py [policy in code] Add support for share instance export location resource 2017-11-16 04:39:00 +00:00
coordination.py Remove unused configuration options 2017-12-13 22:49:35 +08:00
exception.py Add share network with multiple subnets 2019-09-13 11:27:18 -03:00
i18n.py Remove i18n.enable_lazy() translation 2018-11-14 14:09:08 +05:30
manager.py Don't send heartbeats if driver not initializing correctly 2020-01-15 11:34:08 +08:00
opts.py Merge "Add Infortrend Manila Driver" 2019-08-08 14:04:35 +00:00
policy.py Add policy to create/update public shares 2019-02-18 12:56:12 -08:00
quota.py Destroy type quotas when a share type is deleted 2019-03-15 00:10:37 -07:00
rpc.py Disable notifications 2017-07-17 12:45:11 -03:00
service.py Don't send heartbeats if driver not initializing correctly 2020-01-15 11:34:08 +08:00
test.py [pylint] Fix/ignore pylint errors in non-test modules 2019-02-25 17:23:15 +00:00
utils.py [pylint] Fix/ignore pylint errors in non-test modules 2019-02-25 17:23:15 +00:00
version.py Remove vim headers 2014-10-06 15:00:27 +02:00