antville/code/SkinMgr/securityFunctions.js

15 lines
384 B
JavaScript
Raw Normal View History

2001-06-18 08:57:33 +00:00
/**
2001-06-28 18:09:37 +00:00
* check if user is allowed to edit this image
2001-06-18 08:57:33 +00:00
*/
2001-09-05 21:15:45 +00:00
function isEditDenied() {
2001-06-18 08:57:33 +00:00
if (!user.uid) {
2001-09-05 21:15:45 +00:00
user.cache.referer = this.href();
return ("Please login before!");
} else if (user.isBlocked())
return ("Sorry, your account was disabled!");
else if (!this._parent.isUserAdmin())
return ("Sorry, your're not allowed to edit skins!");
return null;
2001-06-18 08:57:33 +00:00
}