From 49f6032b699804b1b0ed56137ab14ba266251157 Mon Sep 17 00:00:00 2001 From: adrian-turjak Date: Mon, 26 Sep 2016 13:06:42 +1300 Subject: Non-Admin can't list own projects Due to a default Keystone policy until Newtown, and the use of resource_find, non-admins are unable to list their own projects. This patch bypasses this problem while also introducing better UX for non-admins wishing to get their project list. 'openstack project list' retains the default of 'list all projects' but on a forbidden error will default instead to 'list my projects'. This way for non-admins 'list my projects' feels like the default without breaking the expected admin default. Adding the '--my-projects' option allows admins to easily list their own projects or allows non-admins to be explicit and bypass the forbidden error fallback. Change-Id: I1021276f69fbbf28e13e17c4e567d932fce7ed8b Closes-Bug: #1627555 --- doc/source/command-objects/project.rst | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc/source/command-objects') diff --git a/doc/source/command-objects/project.rst b/doc/source/command-objects/project.rst index 018cea3e..cb0941ca 100644 --- a/doc/source/command-objects/project.rst +++ b/doc/source/command-objects/project.rst @@ -95,6 +95,7 @@ List projects openstack project list [--domain ] [--user ] + [--my-projects] [--long] [--sort [:,:,..]] @@ -110,6 +111,12 @@ List projects .. versionadded:: 3 +.. option:: --my-projects + + List projects for the authenticated user. Supersedes other filters. + + .. versionadded:: 3 + .. option:: --long List additional fields in output -- cgit v1.2.1