-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When using the aggregates API with a metric ID, the RBAC policy `project_id:%(resource.project_id)s"` fails to authenticate a non-admin user that is part of the project the metric is also part of via its resource relationship. This patch fixes two issues preventing this from working: * Set `details=True` when listing specified metrics to ensure the joined load with the `Metric` and `Resource` models is done. * Add support for processing oslo.db SQLAlchemy models in `gnocchi.rest.api.flatten_dict_to_keypairs` to make sure nested attributes are added to the list of targets passed to the policy enforcer.
- Loading branch information
Showing
3 changed files
with
66 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters