|
19 | 19 | home: 'dashboard', |
20 | 20 |
|
21 | 21 | sectionPreFilter: function(args) { |
| 22 | + var sections = []; |
| 23 | + |
22 | 24 | if(isAdmin()) { |
23 | | - return ["dashboard", "instances", "storage", "network", "templates", "accounts", "domains", "events", "system", "global-settings", "configuration", "projects", "plugins"]; |
| 25 | + sections = ["dashboard", "instances", "storage", "network", "templates", "accounts", "domains", "events", "system", "global-settings", "configuration", "projects"]; |
24 | 26 | } |
25 | 27 | else if(isDomainAdmin()) { |
26 | | - return ["dashboard", "instances", "storage", "network", "templates", "accounts", "domains", "events", "projects"]; |
| 28 | + sections = ["dashboard", "instances", "storage", "network", "templates", "accounts", "domains", "events", "projects"]; |
27 | 29 | } |
28 | 30 | else if (g_userProjectsEnabled) { |
29 | | - return ["dashboard", "instances", "storage", "network", "templates", "accounts", "events", "projects"]; |
| 31 | + sections = ["dashboard", "instances", "storage", "network", "templates", "accounts", "events", "projects"]; |
30 | 32 | } |
31 | 33 | else { //normal user |
32 | | - return ["dashboard", "instances", "storage", "network", "templates", "accounts", "events"]; |
| 34 | + sections = ["dashboard", "instances", "storage", "network", "templates", "accounts", "events"]; |
| 35 | + } |
| 36 | + |
| 37 | + if (cloudStack.plugins.length) { |
| 38 | + sections.push('plugins'); |
33 | 39 | } |
| 40 | + |
| 41 | + return sections; |
34 | 42 | }, |
35 | 43 | sections: { |
36 | 44 | /** |
|
0 commit comments