You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by je...@apache.org on 2014/04/24 02:05:31 UTC
git commit: updated refs/heads/4.4-forward to 9531678
Repository: cloudstack
Updated Branches:
refs/heads/4.4-forward 62cac4f64 -> 953167808
BUG-ID: CS-19795: UI > Add LDAP Account - fix a bug that a LDAP account that does not have email and all LDAP accounts below it are missing from the listing.
Reviewed-by: Brian
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/95316780
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/95316780
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/95316780
Branch: refs/heads/4.4-forward
Commit: 953167808c3e9a9c40a6f7be6e16ebf32c608a4c
Parents: 62cac4f
Author: Jessica Wang <je...@apache.org>
Authored: Wed Apr 23 16:27:44 2014 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Wed Apr 23 17:05:13 2014 -0700
----------------------------------------------------------------------
ui/scripts/accounts.js | 1 +
ui/scripts/ui-custom/accountsWizard.js | 95 +++++++++++++++++++++++++++--
2 files changed, 90 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/95316780/ui/scripts/accounts.js
----------------------------------------------------------------------
diff --git a/ui/scripts/accounts.js b/ui/scripts/accounts.js
index ced9da0..935ba92 100644
--- a/ui/scripts/accounts.js
+++ b/ui/scripts/accounts.js
@@ -97,6 +97,7 @@
label: 'Add LDAP Account',
isHeader: true,
preFilter: function(args) {
+ //if ((isAdmin() || isDomainAdmin()) && true) { //for testing only
if ((isAdmin() || isDomainAdmin()) && isLdapEnabled()) {
return true;
} else {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/95316780/ui/scripts/ui-custom/accountsWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/accountsWizard.js b/ui/scripts/ui-custom/accountsWizard.js
index 5ef0fa9..3259227 100644
--- a/ui/scripts/ui-custom/accountsWizard.js
+++ b/ui/scripts/ui-custom/accountsWizard.js
@@ -130,6 +130,89 @@
dataType: "json",
async: false,
success: function(json) {
+ //for testing only (begin)
+ /*
+ json = {
+ "ldapuserresponse": {
+ "count": 11,
+ "LdapUser": [
+ {
+ "email": "test@test.com",
+ "principal": "CN=Administrator,CN=Users,DC=hyd-qa,DC=com",
+ "username": "Administrator",
+ "domain": "CN=Administrator"
+ },
+ {
+ "email": "test@test.com",
+ "principal": "CN=Guest,CN=Users,DC=hyd-qa,DC=com",
+ "username": "Guest",
+ "domain": "CN=Guest"
+ },
+ {
+ "email": "test@test.com",
+ "principal": "CN=IUSR_HYD-QA12,CN=Users,DC=hyd-qa,DC=com",
+ "username": "IUSR_HYD-QA12",
+ "domain": "CN=IUSR_HYD-QA12"
+ },
+ {
+ "email": "test@test.com",
+ "principal": "CN=IWAM_HYD-QA12,CN=Users,DC=hyd-qa,DC=com",
+ "username": "IWAM_HYD-QA12",
+ "domain": "CN=IWAM_HYD-QA12"
+ },
+ {
+ "email": "test@test.com",
+ "principal": "CN=SUPPORT_388945a0,CN=Users,DC=hyd-qa,DC=com",
+ "username": "SUPPORT_388945a0",
+ "domain": "CN=SUPPORT_388945a0"
+ },
+ {
+ "principal": "CN=jessica j,CN=Users,DC=hyd-qa,DC=com",
+ "firstname": "jessica",
+ "lastname": "j",
+ "username": "jessica",
+ "domain": "CN=jessica j"
+ },
+ {
+ "principal": "CN=krbtgt,CN=Users,DC=hyd-qa,DC=com",
+ "username": "krbtgt",
+ "domain": "CN=krbtgt"
+ },
+ {
+ "email": "sadhu@sadhu.com",
+ "principal": "CN=sadhu,CN=Users,DC=hyd-qa,DC=com",
+ "firstname": "sadhu",
+ "username": "sadhu",
+ "domain": "CN=sadhu"
+ },
+ {
+ "email": "test@test.com",
+ "principal": "CN=sangee1 hariharan,CN=Users,DC=hyd-qa,DC=com",
+ "firstname": "sangee1",
+ "lastname": "hariharan",
+ "username": "sangee1",
+ "domain": "CN=sangee1 hariharan"
+ },
+ {
+ "email": "test@test.com",
+ "principal": "CN=sanjeev n.,CN=Users,DC=hyd-qa,DC=com",
+ "firstname": "sanjeev",
+ "username": "sanjeev",
+ "domain": "CN=sanjeev n."
+ },
+ {
+ "email": "test@test.com",
+ "principal": "CN=test1dddd,CN=Users,DC=hyd-qa,DC=com",
+ "firstname": "test1",
+ "username": "test1dddd",
+ "domain": "CN=test1dddd"
+ }
+ ]
+ }
+ };
+ */
+ //for testing only (end)
+
if (json.ldapuserresponse.count > 0) {
$(json.ldapuserresponse.LdapUser).each(function() {
var $result = $('<tr>');
@@ -137,15 +220,15 @@
$result.append(
$('<td>').addClass('select').append(
$('<input>').attr({
- type: 'checkbox', name: 'username', value: this.username
+ type: 'checkbox', name: 'username', value: _s(this.username)
})
),
- $('<td>').addClass('name').html(this.firstname + ' ' + this.lastname)
- .attr('title', this.firstname + ' ' + this.lastname),
- $('<td>').addClass('username').html(this.username)
+ $('<td>').addClass('name').html(_s(this.firstname) + ' ' + _s(this.lastname))
+ .attr('title', _s(this.firstname) + ' ' + _s(this.lastname)),
+ $('<td>').addClass('username').html(_s(this.username))
.attr('title', this.username),
- $('<td>').addClass('email').html(this.email)
- .attr('title', this.email)
+ $('<td>').addClass('email').html(_s(this.email))
+ .attr('title', _s(this.email))
)
$table.append($result);