bug 13534: template page - remove "All" drop down choice from domain-admin user because API doesn't support it yet. (no templatefilter is for domain-admin to see all templates in his domain).

This commit is contained in:
Jessica Wang 2012-02-09 14:02:24 -08:00
parent e93af6e1f9
commit a4d991f848
1 changed files with 10 additions and 2 deletions

View File

@ -16,7 +16,7 @@
filters: {
all: {
preFilter: function(args) {
if (isAdmin() || isDomainAdmin())
if (isAdmin()) //"listTemplates&templatefilter=all" only works for root-admin, but no domain-admin. Domain-admin is unable to see all templates until listTemplates API supports a new type of templatefilter for domain-admin to see all templates in his domain.
return true;
else
return false;
@ -684,7 +684,15 @@
listView: {
label: 'ISOs',
filters: {
all: { label: 'All' },
all: {
preFilter: function(args) {
if (isAdmin()) //"listIsos&filter=all" only works for root-admin, but no domain-admin. Domain-admin is unable to see all Isos until listIsos API supports a new type of isofilter for domain-admin to see all Isos in his domain.
return true;
else
return false;
},
label: 'All'
},
mine: { label: 'Mine' },
featured: { label: 'Featured' },
community: { label: 'Community' }