mirror of https://github.com/apache/cloudstack.git
community template shows for (1) root-admin role (2) domain-admin role + getUserPublicTemplateEnabled() == "true".
This commit is contained in:
parent
e256285b05
commit
db981484ab
|
|
@ -376,6 +376,14 @@ var vmPopupTemplatePageSize = 6; //max number of templates in VM wizard
|
|||
var currentStepInVmPopup = 1;
|
||||
function initVMWizard() {
|
||||
$vmPopup = $("#vm_popup");
|
||||
|
||||
if (isAdmin() || (isDomainAdmin() && getUserPublicTemplateEnabled() == "true")) {
|
||||
$vmPopup.find("#wiz_community").show();
|
||||
}
|
||||
else {
|
||||
$vmPopup.find("#wiz_community").hide();
|
||||
}
|
||||
|
||||
$("#add_vm_button").unbind("click").bind("click", function(event) {
|
||||
vmWizardOpen();
|
||||
$.ajax({
|
||||
|
|
|
|||
|
|
@ -1158,7 +1158,7 @@ function showLeftNavigationBasedOnRole() {
|
|||
$("#leftmenu_security_group_container").hide();
|
||||
}
|
||||
|
||||
if (getUserPublicTemplateEnabled() == "true") {
|
||||
if (isAdmin() || (isDomainAdmin() && getUserPublicTemplateEnabled() == "true")) {
|
||||
$("#leftmenu_submenu_community_template_container, #leftmenu_submenu_community_iso_container").show();
|
||||
}
|
||||
else {
|
||||
|
|
@ -1252,7 +1252,7 @@ var g_timezone = null;
|
|||
var g_directAttachSecurityGroupsEnabled = "false";
|
||||
function getDirectAttachSecurityGroupsEnabled() { return g_directAttachSecurityGroupsEnabled; }
|
||||
|
||||
g_userPublicTemplateEnabled = "true"
|
||||
var g_userPublicTemplateEnabled = "true"
|
||||
function getUserPublicTemplateEnabled() { return g_userPublicTemplateEnabled; }
|
||||
|
||||
//keyboard keycode
|
||||
|
|
|
|||
Loading…
Reference in New Issue