antville/code/StoryMgr/securityFunctions.js
Robert Gaggl 5dbf80cc46 - removed check if user is blocked (will be done with onRequest())
- changes necessary due to new role-scheme
- removed isAddDenied()
2002-01-22 20:19:34 +00:00

15 lines
474 B
JavaScript

/**
* function checks if user is allowed to view the storylist
* of this weblog
* @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 (!this._parent.userMayContrib() && (membership.level & MAY_ADD_STORY) == 0)
return ("You're not allowed to do this!");
return null;
}