manila/manila
Tom Barron 644cdf4e4f 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)
2020-07-20 23:34:43 +00:00
..
api Enforce policy checks getting share-type by name 2020-07-20 23:34:43 +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 Deprecate old keystone session config opts 2018-12-20 17:29:40 -08:00
data Fix Host-assisted Share Migration with IPv4+IPv6 2018-02-06 17:23:16 -05:00
db Enforce policy checks getting share-type by name 2020-07-20 23:34:43 +00: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-07-01 19:55:40 +00:00
network NeutronBindNetworkPlugin: fix multi segment mtu 2019-07-25 10:54:52 +00:00
policies Add manage/unmanage of shares in DHSS=True 2019-03-05 16:03:29 -03:00
scheduler fix bug in consume from share 2020-04-27 19:01:04 +00:00
share Merge "Add asynchronous error info into messages when share extend error" into stable/stein 2020-07-15 02:26:02 +00:00
share_group [pylint] Fix/ignore pylint errors in non-test modules 2019-02-25 17:23:15 +00:00
testing Remove run_tests.sh 2018-10-04 09:55:45 -04:00
tests Merge "Get ports filtered by subnet id on share-server cleanup" into stable/stein 2020-07-01 20:12:39 +00:00
volume Deprecate old keystone session config opts 2018-12-20 17:29: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 Prevent share type deletion if linked to group types 2020-04-15 07:44:13 -07:00
i18n.py Remove i18n.enable_lazy() translation 2018-11-14 14:09:08 +05:30
manager.py Allow configuration of a back end specific availability zone 2019-01-23 17:13:24 +00:00
opts.py Manila share driver for Inspur AS13000 series. 2018-07-03 18:35:55 +08: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 Allow configuration of a back end specific availability zone 2019-01-23 17:13:24 +00: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