Poll.checkVote (usr, level)
check if user is allowed to vote in a poll

  • Parameter Obj:
    Userobject
  • Parameter Int:
    Permission-Level
  • Returns
    String Reason for denial (or null if allowed)
Sourcecode in Poll/securityFunctions.js:
1:   function checkVote(usr, level) {
2:      this.site.checkView(usr, level);
3:      if (this.closed)
4:         throw new DenyException("pollClosed");
5:      return;
6:   }