Merge "Check project permissions for share replicas"
This commit is contained in:
commit
5611439891
@ -1862,6 +1862,12 @@ def _share_replica_get_with_filters(context, share_id=None, replica_id=None,
|
||||
query = model_query(context, models.ShareInstance, session=session,
|
||||
read_deleted="no")
|
||||
|
||||
if not context.is_admin:
|
||||
query = query.join(
|
||||
models.Share,
|
||||
models.ShareInstance.share_id == models.Share.id).filter(
|
||||
models.Share.project_id == context.project_id)
|
||||
|
||||
if share_id is not None:
|
||||
query = query.filter(models.ShareInstance.share_id == share_id)
|
||||
|
||||
|
@ -0,0 +1,8 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixed an issue that caused Manila to return all projects' share replicas
|
||||
even when the user was not an administrator. Now, when the user is not an
|
||||
administrator, only the replicas in the project perspective are going to
|
||||
be displayed. For more details, please refer to
|
||||
`Launchpad Bug #1922243 <https://bugs.launchpad.net/manila/+bug/1922243>`_
|
Loading…
Reference in New Issue
Block a user