mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
bug 12984
Allow domain admins the same project privileges as ROOT admins status 12984: resolved fixed
This commit is contained in:
parent
c42f50c4b0
commit
1562c2fe7a
@ -486,7 +486,7 @@
|
||||
url: createURL('listProjects', { ignoreProject: true }),
|
||||
data: {
|
||||
accountId: user.userid,
|
||||
listAll: isAdmin()
|
||||
listAll: true
|
||||
},
|
||||
dataType: 'json',
|
||||
async: true,
|
||||
@ -539,7 +539,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
var apiCmd = "listProjects&page=" + args.page + "&pagesize=" + pageSize + array1.join("") + '&listAll=' + isAdmin();
|
||||
var apiCmd = "listProjects&page=" + args.page + "&pagesize=" + pageSize + array1.join("") + '&listAll=true';
|
||||
$.ajax({
|
||||
url: createURL(apiCmd, { ignoreProject: true }),
|
||||
dataType: 'json',
|
||||
@ -829,7 +829,8 @@
|
||||
var projectsActionFilter = function(args) {
|
||||
var allowedActions = ['destroy'];
|
||||
|
||||
if (args.context.item.account == cloudStack.context.users[0].account || isAdmin()) {
|
||||
if (args.context.item.account == cloudStack.context.users[0].account ||
|
||||
isAdmin() || isDomainAdmin()) {
|
||||
if (args.context.item.state == 'Suspended') {
|
||||
allowedActions.push('enable');
|
||||
} else if (args.context.item.state == 'Active') {
|
||||
|
||||
@ -160,7 +160,7 @@
|
||||
};
|
||||
|
||||
// Only show management tabs to owner of project
|
||||
if (isAdmin() || (
|
||||
if (isAdmin() || isDomainAdmin() || (
|
||||
cloudStack.context.projects &&
|
||||
(cloudStack.context.projects[0].account == cloudStack.context.users[0].account)
|
||||
)) {
|
||||
@ -170,7 +170,7 @@
|
||||
tabs.invitations = pageElems.dashboardTabs.invitations;
|
||||
}
|
||||
|
||||
if (isAdmin()) {
|
||||
if (isAdmin() || isDomainAdmin()) {
|
||||
tabs.resources = pageElems.dashboardTabs.resources;
|
||||
}
|
||||
}
|
||||
@ -333,7 +333,7 @@
|
||||
)
|
||||
);
|
||||
|
||||
if (isAdmin()) {
|
||||
if (isAdmin() || isDomainAdmin()) {
|
||||
$ul.append(
|
||||
// Resources tab
|
||||
$('<li>').addClass('last').append(
|
||||
@ -346,7 +346,7 @@
|
||||
cloudStack.context.projects = [project];
|
||||
|
||||
var $resources;
|
||||
if (isAdmin()) {
|
||||
if (isAdmin() || isDomainAdmin()) {
|
||||
$resouces = $('<div>')
|
||||
.attr({ id: 'new-project-review-tabs-resouces' })
|
||||
.appendTo($tabs)
|
||||
@ -544,7 +544,7 @@
|
||||
loadData(function() {
|
||||
if (!$list.find('li').size()) {
|
||||
cloudStack.dialog.notice({
|
||||
message: isAdmin() || g_userProjectsEnabled ?
|
||||
message: isAdmin() || isDomainAdmin() || g_userProjectsEnabled ?
|
||||
'You do not have any projects.<br/>Please create a new one from the projects section.' :
|
||||
'You do not have any projects.<br/>Please ask your administrator to create a new project.'
|
||||
}).closest('.ui-dialog');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user