You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2021/09/04 10:21:22 UTC
[cloudstack] branch 4.15 updated: Legacy UI: Display Accounts Tab
to Project Admins (#5408)
This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch 4.15
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.15 by this push:
new 01683ca Legacy UI: Display Accounts Tab to Project Admins (#5408)
01683ca is described below
commit 01683ca131ea9d520702ff17c1bd3503cc2ca165
Author: Rohit Yadav <ro...@shapeblue.com>
AuthorDate: Sat Sep 4 15:50:56 2021 +0530
Legacy UI: Display Accounts Tab to Project Admins (#5408)
Co-authored-by: Pearl Dsilva <pe...@gmail.com>
---
ui/legacy/scripts/projects.js | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/ui/legacy/scripts/projects.js b/ui/legacy/scripts/projects.js
index 0acc523..5840881 100644
--- a/ui/legacy/scripts/projects.js
+++ b/ui/legacy/scripts/projects.js
@@ -987,14 +987,19 @@
tabFilter: function(args) {
var project = selectedProjectObj;
- var projectOwner = project.account;
+ var projectOwners = project.owner;
+ var projectOwner = []
+ for (var i in projectOwners) {
+ projectOwner.push(projectOwners[i].account)
+ }
+
var currentAccount = args.context.users[0].account;
var hiddenTabs = [];
if (!isAdmin() && !isDomainAdmin()) {
hiddenTabs.push('resources');
- if (currentAccount != projectOwner) {
+ if (!projectOwner.includes(currentAccount)) {
hiddenTabs.push('accounts');
hiddenTabs.push('invitations');
}