antville/code/StoryMgr/securityFunctions.js

18 lines
492 B
JavaScript
Raw Normal View History

2001-11-18 13:16:53 +00:00
/**
* function checks if user is allowed to view the storylist
* of this site
* @param Obj Userobject
* @return String Reason for denial (or null if allowed)
2001-11-18 13:16:53 +00:00
*/
function isDenied(usr) {
if (!this._parent.userMayContrib()) {
var membership = this._parent.isUserMember(usr);
if (!membership)
return (getMsg("error","userNoMember"));
else if ((membership.level & MAY_ADD_STORY) == 0)
return (getMsg("error","storyAddDenied"));
}
2001-11-18 13:16:53 +00:00
return null;
}