in source/javascripts/phonebook.js [439:557]
function showProject(obj, prj) {
var details = document.getElementById('details_project_' + prj)
if (!details) {
details = document.createElement('p')
details.setAttribute("id", 'details_project_' + prj)
var desc = committees[prj].description
if (!desc) {
desc = 'TBA (please ensure that <a href="http://www.apache.org/index.html#projects-list">the projects list</a> is updated)'
}
var chair = getChair(prj)
if (chair) {
details.innerHTML += "<b>Chair:</b> " + chair + "<br/><br/>"
}
var url = committees[prj].site
var cl
var clExists = false // Does the unix group exist?
try {
cl = ldapprojects[prj].members.slice()
clExists = true
} catch (err) { // Allow for missing Unix group
cl = []
}
var pl = []
var pmc = committees[prj]
var pmcnoctte = [] // on pmc but not in LDAP committee
var cttenopmc = [] // In LDAP ctte but not on PMC
var ldappmc = []
var ctteeExists = false
if (isProjectPMC(prj)) { // may not exist, e.g. for 'member' PMC and if group has yet to be created
ldappmc = ldapprojects[prj].owners
ctteeExists = true
}
var pmcnounix = [] // on PMC but not in LDAP unix group
var cttenounix = [] // In LDAP ctte but not in LDAP unix
if (pmc) {
for (var c in pmc.roster) {
pl.push(c)
}
for (var i in ldappmc) {
if (!(ldappmc[i] in pmc.roster)) {
cttenopmc.push(ldappmc[i])
}
}
}
cl.sort()
pl.sort()
// Must use cl before it is re-used to hold the entries
if (clExists && prj != 'member') { // does not exist for 'member' PMC
for (var i in ldappmc) {
var id = ldappmc[i]
if (cl.indexOf(id) < 0) { // in LDAP cttee but not in LDAP unix
cttenounix.push(id)
}
}
}
for (var i in pl) {
var id = pl[i]
pl[i] = "<tr><td><b>" + getCommitterName(pl[i]) + "</b></td><td>(" + hiliteMember(pl[i]) + ")</td></tr>"
if (clExists && cl.indexOf(id) < 0) { // On PMC but not in LDAP unix group
pmcnounix.push(id)
}
if (prj != 'member' && ldappmc && ldappmc.indexOf(id) < 0) { // in PMC but not in LDAP committee (does not apply to member)
pmcnoctte.push(id)
}
}
for (var i in cl) {
cl[i] = "<tr><td><b>" + getCommitterName(cl[i]) + "</b></td><td>(" + hiliteMember(cl[i]) + ")</td></tr>"
}
if (pl.length > 0) {
if (prj == 'member') {
details.innerHTML += "<b>ASF members</b><br><br><table>" + pl.join("\n") + "</table><br/>"
} else {
details.innerHTML += "<h4>PMC members (also in the committer group): " + pl.length + "</h4><table>" + pl.join("\n") + "</table><br/>"
}
}
if (cl && cl.length > 0) {
details.innerHTML += "<h4>Committers: " + cl.length + "</h4><table>" + cl.join("\n") + "</table>"
if (podlings[prj]) {
details.innerHTML += "<span class='error'>WARNING: <a href='?podling=" + prj + "'>" + prj + " podling group</a> also exists - this can cause authentication issues</span><br/><br/>"
}
} else {
if (!clExists) {
details.innerHTML += "<span class='error'>LDAP unix group not present!</span><br/><br/>"
}
}
if (pmcnoctte.length) {
if (ctteeExists) {
details.innerHTML += "<span class='error'>PMC members not in LDAP committee group:</span> " + userList(pmcnoctte) + "<br/><br/>"
} else {
details.innerHTML += "<span class='error'>LDAP committee group not present!</span><br/><br/>"
}
}
if (pmcnounix.length) {
if (prj == 'member') {
details.innerHTML += "<span class='error'>ASF members not in committers(unix) group:</span> " + userList(pmcnounix) + "<br/><br/>"
} else {
details.innerHTML += "<span class='error'>PMC members not in committers(unix) group:</span> " + userList(pmcnounix) + "<br/><br/>"
}
}
if (cttenounix.length) {
details.innerHTML += "<span class='error'>LDAP committee group members not in committers(unix) group:</span> " + userList(cttenounix) + "<br/><br/>"
}
if (cttenopmc.length) {
details.innerHTML += "<span class='error'>LDAP committee group members not on PMC:</span> " + userList(cttenopmc) + "<br/><br/>"
}
obj.appendChild(details)
} else {
obj.removeChild(details)
}
}