Pkg definition page should show owned pkgs for non-admins
Currently, the package definitions page shows all packages to all users. This needs to be changed so that only admins see all packages on the package definition page while non-admins see only their own packages on the package definition page. This is needed for the bugfix in that we want the api search function to be able to return only packages that are deployable by the current tenant* in some situations while, in other situations, to return a list of packages appropriate for package editing views. * 'deployable by the current' tenant means enabled packages that are (a) public or (b) owned by the current user. Change-Id: I3032ba7756c150eeb8942a5991dd69ea153dad28 Partial-Bug: #1307963
This commit is contained in:
parent
2ac717d87f
commit
4c8a799dcd
|
@ -30,7 +30,10 @@ class PackageDefinitionsView(tables.DataTableView):
|
|||
def get_data(self):
|
||||
pkgs = []
|
||||
with api.handled_exceptions(self.request):
|
||||
pkgs = api.muranoclient(self.request).packages.list()
|
||||
pkgs = api.muranoclient(self.request).packages.filter(
|
||||
include_disabled=True,
|
||||
owned=True
|
||||
)
|
||||
return pkgs
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue