Story.checkPost (usr, level) |
check if user is allowed to post a comment to this story
|
Sourcecode in Story/securityFunctions.js:
1: function checkPost(usr, level) { 2: if (!usr.sysadmin && !this.site.online && level == null) 3: throw new DenyException("siteView"); 4: else if (!this.site.preferences.getProperty("discussions")) 5: throw new DenyException("siteNoDiscussion"); 6: else if (!this.discussions) 7: throw new DenyException("storyNoDiscussion"); 8: return; 9: } |