2001-11-18 13:16:53 +00:00
|
|
|
/**
|
|
|
|
* function checks if user is allowed to view the storylist
|
|
|
|
* of this weblog
|
2001-12-10 23:31:25 +00:00
|
|
|
* @param Obj Userobject
|
|
|
|
* @return String Reason for denial (or null if allowed)
|
2001-11-18 13:16:53 +00:00
|
|
|
*/
|
|
|
|
|
2001-12-10 23:31:25 +00:00
|
|
|
function isDenied(usr) {
|
2002-01-22 20:19:34 +00:00
|
|
|
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!");
|
2001-11-18 13:16:53 +00:00
|
|
|
return null;
|
|
|
|
}
|