antville/code/SkinMgr/securityFunctions.js
Robert Gaggl 13773de48c - removed check if user is blocked (will be done with onRequest())
- changes necessary due to new role-scheme
- renamed isEditDenied() to isDenied()
2002-01-22 20:20:15 +00:00

14 lines
413 B
JavaScript

/**
* check if user is allowed to edit this image
* @param Obj Userobject
* @return String Reason for denial (or null if allowed)
*/
function isDenied(usr) {
var membership = this._parent.isUserMember(usr);
if (!membership)
return ("You're not a member of this weblog!");
else if ((membership.level & MAY_EDIT_SKINS) == 0)
return ("You're not allowed to edit skins!");
return null;
}