- removed functions isAdmin(), isContributor()

- some more changes needed due to new role-scheme
This commit is contained in:
Robert Gaggl 2002-01-22 20:09:25 +00:00
parent 7a85b9ffef
commit e395ff7767

View file

@ -1,24 +1,3 @@
/**
* function returns true if the member has admin-status
*/
function isAdmin() {
if (parseInt(this.level,10) == 2)
return true;
return false;
}
/**
* function returns true if the member has contributor-status
*/
function isContributor() {
if (parseInt(this.level,10) == 1)
return true;
return false;
}
/**
* function updates a membership
* @param Int Integer representing role of user
@ -31,10 +10,17 @@ function isContributor() {
function updateMember(lvl,modifier) {
var result = new Object();
if (!isNaN(lvl)) {
this.level = lvl;
if (lvl == 1)
this.level = getContributorLvl();
else if (lvl == 2)
this.level = getContentManagerLvl();
else if (lvl == 3)
this.level = getAdminLvl();
else
this.level = 0;
this.modifytime = new Date();
this.modifier = modifier;
this.sendConfirmationMail(modifier.email);
// FIXME: disabled for testing: this.sendConfirmationMail(modifier.email);
result.message = "Changes were saved successfully!";
result.error = false;
} else {