create() API in cinder/volume/api.py does the authority check
in cinder/volume/flows/api/create_volume.py.
This creates potential for disclosing information during error checking
prior to user authorization being checked.
This fix will do authority check to create() itself, so that
it is done before proceeding with the rest of code flow.
Change-Id: I27dbdf5f3ae4e3d681cdbf77df10706721254ffc
Closes-Bug: #
1472031
source_replica=None, consistencygroup=None,
cgsnapshot=None, multiattach=False, source_cg=None):
+ check_policy(context, 'create')
+
# NOTE(jdg): we can have a create without size if we're
# doing a create from snap or volume. Currently
# the taskflow api will handle this and pull in the