Poll.checkEdit (usr, level) |
check if user is allowed to edit a poll
|
Sourcecode in Poll/securityFunctions.js:
1: function checkEdit(usr, level) { 2: if (this.votes.size() > 0) 3: throw new DenyException("pollEdit"); 4: if (this.creator != usr && (level & MAY_EDIT_ANYSTORY) == 0) 5: throw new DenyException("pollEdit"); 6: return; 7: } |