manila/manila/db
Tom Barron e02cc6d6bc 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)
2020-07-15 17:26:52 +00:00
..
migrations Create share from snapshot in another pool or backend 2020-04-09 11:15:22 -03:00
sqlalchemy Enforce policy checks getting share-type by name 2020-07-15 17:26:52 +00:00
__init__.py Remove vim headers 2014-10-06 15:00:27 +02:00
api.py Create share from snapshot in another pool or backend 2020-04-09 11:15:22 -03:00
base.py Reuse 'periodic_task' from oslo_service 2015-07-20 19:38:19 +03:00
migration.py Remove vim headers 2014-10-06 15:00:27 +02:00