manila/manila/api
Tom Barron 9b1b3957b9 Enforce policy checks getting share-type by name
Policy checks are skipped when looking up a share-type
by name.  This causes share creation attempts that specify
a valid share-type to pass the early API check on share type
even if the share type named is private and not shared with
the user's project.  The share creation fails later, but after
the database record for the share is created.  Although the
operation fails with an ERROR, the share is stuck in CREATING
state.

Fix this issue by checking the user's project in the database
API just as we do for share type lookups by uuid.

Closes-bug: #1885956
Change-Id: If5fe32c155fe0861b3ed86b862335e062796056b
(cherry picked from commit f877deed51)
(cherry picked from commit e02cc6d6bc)
(cherry picked from commit 2f2ed258f7)
(cherry picked from commit 644cdf4e4f)
(cherry picked from commit 11971a94d3)
2020-07-25 11:07:55 +00:00
..
contrib Port share type extensions to core API 2015-11-12 14:58:20 +00:00
middleware Fix UnicodeDecodeError when decode API input 2018-02-07 06:37:32 +00:00
openstack Fix API version inferred w/ un-versioned URLs 2019-03-18 12:10:23 +00:00
v1 Enforce policy checks getting share-type by name 2020-07-25 11:07:55 +00:00
v2 Enforce policy checks for share export locations 2020-03-29 13:08:29 +00:00
views Add count info in /shares and /shares/detail response 2017-12-13 01:46:17 +00:00
__init__.py Remove enable_v1_api and enable_v2_api config opts 2016-08-23 08:27:22 +02:00
auth.py Remove log translations in api 1/5 2017-03-29 16:55:05 +08:00
common.py Fix pagination does not speed up queries bug 2019-10-18 23:22:33 +00:00
extensions.py If only .pyc exist, the extension API will be disabled 2020-03-31 00:01:23 +00:00
urlmap.py Trivial: Remove unused logging import 2015-12-28 21:44:26 -05:00
versions.py Mark 'v1' API deprecated in the versions response 2017-01-27 14:12:39 +00:00